Re: Multi Array

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

 



Hi Warper, I have tried this. It is really helpful. Thanks u a lot.

<?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")
);
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>

On Wed, Dec 16, 2009 at 9:55 PM, jan <os2@xxxxxxxxxxx> wrote:

>
>
> <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<binoymvee%40yahoo.co.in>>
> 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<svch_sou%40yahoo.co.uk>>*
> wrote:
> >>
> >>
> >> From: Sovichea SOU <svch_sou@xxxxxxxxxxx <svch_sou%40yahoo.co.uk>>
> >> Subject:  Multi Array
> >> To: php-objects@xxxxxxxxxxxxxxx <php-objects%40yahoogroups.com>
> >> 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]
>
>  
>



-- 
Sovichea SOU
Portable: (855)12 981 696 - (855)16 981 696
Email: chhit@xxxxxxxxx
          sovichea@xxxxxxxxxx
Website: www.chhit.com - www.sovichea.info


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



------------------------------------

Are you looking for a PHP job?
Join the PHP Professionals directory Now!
http://www.phpclasses.org/jobs/
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php-objects/join
    (Yahoo! ID required)

<*> To change settings via email:
    php-objects-digest@xxxxxxxxxxxxxxx 
    php-objects-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



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

  Powered by Linux