Say I have this array for example:
print_r($array);
Prints:
Code: [Select]Array
(
[0] => Array
(
[status] => 0
)
[1] => Array
(
[status] => 1
)
[1] => Array
(
[status] => 0
)
)
Now I have another array:
$color_array = array('0'=>'nocolor','1'=>'green');
How I can do the logic of this?
foreach($array as $tmp){
// Say status holds "1" in this case so it translate to
//$color_array[1]; = green
echo "{$color_array[$tmp['status']]}";
}
Obviously the above generate Illegal offset type. So I cant do that.
Revoking alter any table from a schema
Hi All,
Help with parsing this html
Hi, I've got some html i just need a couple of strings from.. argh, it's freaking me out. I've tried a lot.Here is the html:Code: <div id="Tab01" style="overflow: auto;
How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..http://90.202.46.253thats the site, if u go on there, regsiter and login u will see that u can then
dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one I display mysql results in a tableEach row has a link which must send the title of the row to "result.php"
Concatenate two strings ???
I have string one $string1 and another $string2.How to concatenate (add) both of them $string1+" "+$string2 also check condition for the total string length not more than 100 characters
Quick Question about echo value
Hey guys, I'm trying to get something to show differently in one of my scripts. I'm trying to make it so that people that are a certain rank in my game will have their names show up bold in the users
Problem with PHP/mySQL login code
Hello,There is an error in my login script and I can't figure out what it is...I believe it might be my "SELECT" statement...Can anyone help me? Code: <?php//define ('SASI Services
Storing Values taken from a DB...
Using this code it will generate a short list from my database <?phpmysql_connect('localhost','root','');mysql_select_db("clients");$fname = $_POST['firstname'];$SQL = "SELECT *
Calling strings from other php class
I have test1.php{$string1;$string2;....... //10 strings in this class $string10;}Another class test2.php{.........I want to use those 10 strings here, how should I do it?}
Suggestions for Functional module
Hello experts,