|
Posted by J.O. Aho on 03/01/07 17:13
badmets@gmail.com wrote:
> hey-- im a php newbie, and am trying to figure out how to add a
> hyperlink to the images i am using in a shuffle array. in other
> words, i have a page that displays random images via the shuffle
> script, and i want those images to have hyperlinks. can anyone lead
> me in the right direction? here's the script:
>
> $pictures = array('http://url1.jpg', 'http://url2.jpg');
>
> shuffle($pictures);
> ?>
> <?php
> for ( $i = 0; $i < 1; $i++ )
> {
> echo '<img src=';
> echo $pictures[$i];
>
echo '<a href="'.$theaddress.'"><img src='.$pictures[$i].'"></a>';
This is really a question for alt.html and not alt.php.
--
//Aho
Navigation:
[Reply to this message]
|