Reply to array from databse

Your name:

Reply:


Posted by Beshoo on 01/31/06 21:17

hi:
I have this script to get the rows from databbase:

<?php

$qu="select cat_name from cat_table ";
$q_exe=mysql_query($qu);
$num=mysql_num_rows($q_exe);
while ($row=mysql_fetch_assoc($q_exe))
{

$a1=$row['car_id'];
$a1=$row['car_name'];
$a1=$row['car_parent_id'];

$categories = array(array($a1,$a2,$a3));
}
?>

Ok?!!...... BUT >>> I have a problem to get them in array 2 DIM.
LIKE THIS :::

$categories = array(
array(1,'books',0 ),
array(2,'electronics',0),
array(3,'computers',0),
array(6,'germany',0),
array(5,'English',0),
array(7,'fezia',0),
array(8,'DRAMA1',0),
array(9,'dr Fausts', 8),
array(10,'jow of malta', 8),
array(11,'every man', 8),
array(12,'every man s1', 11),
array(13,'every man s2',11),
array(14,'every man s3',11));


__________________ shortly __ I want to get the result in array like
this ______
Thaaaaaaaanx in advance

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация