+ 3
Help with for each multidimensional array using for each
If a user with ID 30 has 5 records in the transaction table. Let’s say Amount. Transaction type Good. Good boy Bad. Bad boy Cool. Cool boy Love. Love boy Me. Me boy When querried , What I want is for the amount colum to be converted to a variable name while the value would be what’s in the transaction type. The result I’m expecting would now be $good = good boy $bad = bad boy $cool = cool boy $love = love boy $me = me boy Is this possible?
1 Réponse
0
Remember that a multi dimensional is like having a table within a table.
$table = array ("good" => "good boy", "bad" => "bad boy", "cool" => "cool boy", "love" => "love boy", "me" => "me boy");