Pretty Printing Arrays in PHP? Auto_Increment Problem, Help =(?
it prints like this, shud be 7 lines and no repetition:
”Array ( [0] => 2 [id] => 2 [1] => Dell [name] => Dell [2] => http://beta.aligajani.com/2009ProfilePic.jpg [url] => http://beta.aligajani.com/2009ProfilePic.jpg [3] => 100 [width] => 100 [4] => 100 [height] => 100 [5] => 1200 [price] => 1200 [6] => 10 [quantity] => 10 ) ”
my list object code is:
function getObjectsArray() {
$query = "SELECT * FROM cart";
$result = mysql_fetch_array(mysql_query($query));
return $result;
OH and also, it prints just the first Element in the table.
moreover, the auto_increment doesnt work out even after i added the query, like if I empty the 2 entry table to 0 data, and enter new, it starts with id=3
Pretty Printing in PHP [Arrays]
Moderator: General Moderators
Re: Pretty Printing in PHP [Arrays]
I was going to help you. Really: I had already read the question and was writing something in the Reply page... But since you PMed me for no reason but to solicit advice, I will not.