i have a for loop that contains varibale that changes from 1 -> 6
all that i need is to replace the variable $query to be $query1 when $n equals to 1, $query2 when n=2 ect…..
but i need it to be variable $query1, $query2 , $query3…$query6
can anyone help me plz
[code=php]
<? for ($n = 1; $n <=6; $n++) {?>
<div style=’display:<? if($n==1) {echo ‘block’;} else {echo ‘none’;}?>’ id='<?=$n;?>’>
<?
$query = “SELECT b.cat_id as cat_id,c.category as category , b.title as title, b.contento as contento FROM general b, category c WHERE b.section=’careers’ and b.cat_id=$n and c.cat_id=b.cat_id ORDER BY b.id”;
$result=mysql_query($query)?>