hello every one i want to convert my array into other array type , plz help me out . I m using this
$row = mysql_fetch_array($result, MYSQL_ASSOC);
The only way to avoid doing a loop would to use PDO (PHP Data Objects) which is a better way to access database in PHP and you could do this :
$pdo = new PDO('mysql:host=localhost;dbname=test', 'root', ''); $q = $pdo->query('select * from yourtable'); $r = $q->fetchAll(); var_dump($r);