Re: Random Link
| From: | (Dave Daniels) | Date: | Tue, 15 Aug 2000 14:18:53 +0000 |
| Subject: | Re: Random Link | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11804@lists.php.net to get a copy of this message | ||
You won't get blasted for a message like this, so no need to apologize. At
least it's related to PHP, unlike half the other postsers who *do* want
someone to do their work for them.
I would create an associative array of titles and pages, then use the random
function (http://www.php.net/manual/html/function.rand.html). After that,
it's just a matter of printing the correct html.
----- Original Message -----
From: "Shane McBride" <sales@riversidedesigns.net>
To: "Php-General" <php-general@lists.php.net>
Sent: Tuesday, August 15, 2000 9:07 AM
Subject: [PHP] Random Link
> I know I'll get blasted for posting this message, so I apologize.
>
> I am looking to create a script that will generate random links on a web
> page. I want the script to read the html files in the current directory.
> Then extract the page title from the html tags and display those titles as
> links on the html page.
>
> I am a novice at php and have no idea where to start. I think I can do it
> with hard coded links in an array, but I want it to be more dynamic
because
> we add and delete pages frequently.
>
> I am not asking for someone to write the script. All I am asking is that
> someone points me in the correct direction. I searched the web for an
> example, but no luck.
>
> TIA,
> Shane
>
>
>
>
----------------------------------------------------------------------------
----
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net