RE: Parsing database variables

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

 



thought about that, I would need to do one ereg for each variable then
correct? as of right now, there are 0 variables in the first field, and 17
in the second...  so it would be 17 ereg replaces... then if i add or change
anything, possibly more...
 
This will work, but was hoping for an easier way...
 
Jake
 


   _____  

From: Daniel Brown [mailto:parasane@xxxxxxxxx] 
Sent: Friday, March 30, 2007 5:02 PM
To: Jake McHenry
Subject: Re:  Parsing database variables



    Jake, could you use ereg_replace() to do that?

<?
//....
while($row = mysql_fetch_array($result)) {
    $html = ereg_replace("$"."name",$name,$row['column_name'];
} 

    I split the first field of the ereg_replace() input so that it wouldn't
be read by the function as a variable.


On 3/30/07, Jake McHenry <HYPERLINK
"mailto:linux@xxxxxxxxxxxxxxxxx"linux@xxxxxxxxxxxxxxxxx> wrote: 

Sorry.. Typos... But that's not the point... I looked the function... Dunno 
how I missed it.... Thanks... Do you know if eval() has any size limitations
to it? The database fields are about a page each....

Thanks,
Jake


> -----Original Message-----
> From: Jay Blanchard [mailto: HYPERLINK
"mailto:jblanchard@xxxxxxxxxx"jblanchard@xxxxxxxxxx]
> Sent: Friday, March 30, 2007 4:50 PM
> To: Jake McHenry; HYPERLINK
"mailto:php-general@xxxxxxxxxxxxx"php-general@xxxxxxxxxxxxx
> Subject: RE:  Parsing database variables 
>
> [snip]
> I have a database table with this in it:
>
>
> <p>$name<p>
> Period Ending Date: $ppe<p>
> Etc.......
>
>
> And in my script, these variables exist and have values. Is 
> there a way
> for
> me to get the output from mysql_query to use the current script
> variables in
> place of the same variable name within the database output?
> [/snip]
>
> a. Bad HTML, always use a closing tag like </p>
> b. Check HYPERLINK "http://www.php.net/eval"http://www.php.net/eval
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.446 / Virus Database: 268.18.23/740 - Release
> Date: 3/30/2007 1:15 PM
>
>

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM


--
PHP General Mailing List (HYPERLINK
"http://www.php.net/"http://www.php.net/)
To unsubscribe, visit: HYPERLINK
"http://www.php.net/unsub.php"http://www.php.net/unsub.php






-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107 


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007
1:15 PM
 

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux