I want to assign a array value to a variable while i am fetching value from a database with loop. You can say displaying values from a table & want to assign that coming values into a variable then want to show that variable separately but have some problem. Can any body share with me his experience
What problem you had?? I didn't faced any i used an variable say $i and it counts and used $variable[$i] And printed that!
acutally i am gettting this from table while ($getrow = mysql_fetch_assoc($get)) { if($getrow['code']==$search) {echo $getrow['code']; echo (" </br>"); echo $getrow['name']; echo (" </br>"); echo $getrow['URL']; Three varaible which show output just like this 001 Job www.jobs.com Now i want to make job hyperlink with show URL www.jobs.com. There are approximately many records in my database. Now i desire to get output just like this ( want to make job hyperlink with inserted URL againist 001 in table) 001 Job www.jobs.com
Looking at your code above, you will need something like, while ($getrow = mysql_fetch_assoc($get)) { if($getrow['code']==$search) { echo $getrow['code']; echo (" </br>"); echo '<a href="'.$getrow['URL']'" title="'.$getrow['name'].'">'.$getrow['name'].'</a>'; echo (" </br>"); echo $getrow['URL']; } } PHP: