Re: extracting variables from files
| From: | lallous | Date: | Thu, 01 Aug 2002 12:28:55 +0000 |
| Subject: | Re: extracting variables from files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-110656@lists.php.net to get a copy of this message | ||
try str_replace()
or preg_replace()
Elias,
"Nick Wilson" <nick@tioka.com> wrote in message
news:20020731204112.GA4148@explodingnet.com...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi everyone,
>
> I break out in a cold sweat just thinking about regex, so I thought I'd
> ask you if there was an easier way to do this:
>
> I want to look through all of the files in a directory and extract a
> certain variable from each.
>
> This is to create a dynamic menu of the directory: The files are php
> scripts that assign $title (among others) to Smarty templates.
>
> I need to get $title from each file
>
> I had a look through the docs and didn't see anything obvious, which is
> why I'm here :-)
>
> Many thanks...
> - --
> Nick Wilson // www.tioka.com
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE9SEtnHpvrrTa6L5oRAuVyAJ4j4jfC4nKKni3S6V5xsmZH2xhPDQCdF7wA
> Y0vShZPQ1n5qZE48LIhCVyA=
> =DLPZ
> -----END PGP SIGNATURE-----