-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have set an array in my config file that I use global in my functions.
This works fine, but now I want to pass the name of this array as a @param in my function.
// in config file:
$album_type_arr = array("appartamento", "villa");
global $album_type_arr; // pull in from db_config
echo $album_type_arr[0];
function…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a tricky one.
By means of a <cfoutput query="…"> I list some records in the page from a SQL Server database.
By the end of each line viewing I try to add this in to a record in a MySQL database.
As you see is simple, because I can use the exact variables from the output query in to…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
One of the very tricky question asked in an interview...
we need to swap the values of two variables like a=10 and b=15
Generaly to swap two variables values, we need 3rd variable like..
temp=a
a=b
b=temp
Now the requirement is, swaping value of two variable values without using 3rd variable…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hey guys...
$bookA = "123";
$crack = "A";
I want to do something similar to this:
echo $book$crack;
Such that the output is 123.
What is the correct syntax for the echo command?
Thanks.
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
is it possible to copy a variable like this this?
class Colours {
var $var = "one";
var $var2 = array('something', $var);
}
>>> More