Re: Multi Array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<ul>
<?php
$thearray = array(
	array(
		"link" => "http://www.goatse.da.ru";,
		"title" => "Porn",
		"src"	=> "http://www.goatse.da.ru/image.jpg";,
 		"alt"	=> "Porn a lot"),
	array(
		"link" => "http://www.vatican.va";,
		"title" => "The Evil",
		"src"	=> "http://www.vatican.va/image.jpg";,
		"alt"	=> "Evil loves you"),
	array()
);
foreach($thearray as $row){
echo '<li>
<a href="$row['link']" title="$row['title']" target="_blank" >
<img src=$row['src']"" alt="$row['alt']" title="$row['title']" /></a>
</li>';
}
?>
</ul>

Those are only examples. Replace them with correct values.

Regards,
Warper


Sovichea SOU escribió:
> Thanks you Binoy.M.V.
>
> If i want to use array instead of database, how can i?
>
>
>
> Vichea
>
> On Wed, Dec 16, 2009 at 5:43 PM, binoy <binoymvee@xxxxxxxxxxx> wrote:
>
>   
>> <ul>
>> <?php
>> $result =mysql_query("selct * from table")
>> while($row = mysql_fect_array($result )) {
>> echo '<li>
>> <a href="$row['link']" title="$row['title']" target="_blank" >
>> <img src=$row['src']"" alt="$row['alt']" title="$row['title']" /></a>
>> </li>';
>> }
>> ?>
>> </ul>
>> With Regards <http://groups.yahoo.com/group/nidokidos>
>> Binoy.M.V
>>  <http://groups.yahoo.com/group/nidokidos>
>>
>> --- On *Wed, 16/12/09, Sovichea SOU <svch_sou@xxxxxxxxxxx>* wrote:
>>
>>
>> From: Sovichea SOU <svch_sou@xxxxxxxxxxx>
>> Subject:  Multi Array
>> To: php-objects@xxxxxxxxxxxxxxx
>> Date: Wednesday, 16 December, 2009, 7:58 AM
>>
>>
>>
>> Hi,
>>
>> I want to display:
>>
>> <ul>
>> <li>
>> <a href="
>> http://www.wishafri end.com/photo/ photoeffects/ uploadphoto. php?effect=
>> beautifulmoon<http://www.wishafriend.com/photo/photoeffects/uploadphoto.php?effect=beautifulmoon>
>> "
>>
>> title="Beautiful Moon" target="_blank" ><img src="
>> http://www.wishafri end.com/photo/ photoeffects/ thumbs/beautiful moon.jpg<http://www.wishafriend.com/photo/photoeffects/thumbs/beautifulmoon.jpg>
>> "
>>
>> alt="Beautiful Moon" title="Beautiful Moon" /></a>
>> </li>
>> </ul>
>>
>> How can I use array to loop from database?
>>
>> Many thanks
>>
>> Vichea
>>
>> [Non-text portions of this message have been removed]
>>
>>  
>>
>>
>> ------------------------------
>> The INTERNET now has a personality. YOURS! See your Yahoo! Homepage<http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/>
>> .
>>
>>     
>
>
>
>   



[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux