![]() |
|
#1
|
||||
|
||||
Parsing PHP code that's stored in a database.I am stuck with trying to parse PHP codes that are stored together with text in a database. For example, 1 column in my db stores text like this:
Code:
Anybody know how I can get the PHP above to work when i retrieve the data? __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
||||
|
#2
|
|||
|
|||
|
One link:
www.php.net The eval() function. Tadaa! Garth Farley |
|
#3
|
|||
|
|||
If stored string has been encoded with htmlentities()...One more link:
us3.php.net If the stored string has been encoded with htmlentities() it should first be decoded with html_entity_decode() before being passed to eval(). |
|
#4
|
||||
|
||||
|
Hello HaigEK,
Thank you for the suggestion but the original example string in the question was: Code:
When we upgraded the forum script from phpBB to vbulletin, the export script did mess up a few posts and while I fixed most of them, I seem to have missed the one on this thread, also I am sure there are others... But thanks just the same __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
New Corolla Altis, 10th Generation - Part I by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Optimizing your web server with Turck MMCache for PHP | JdS | Web Hosting Forum | 2 | 07-Jan-2004 07:48 |
| PHP in HTML | jrobbio | Web Design Forum | 4 | 24-Jul-2003 06:05 |
| All the big PHP script collections that matter | jrobbio | MySQL / PHP Forum | 5 | 06-Jun-2003 16:14 |
| [Tutorial] MySQL Basics | nniehoff | MySQL / PHP Forum | 15 | 23-Mar-2003 19:42 |
| PHP code snippet library - Anyone have any use for this? | jrobbio | MySQL / PHP Forum | 1 | 02-Mar-2003 15:18 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The