any ide a to do working that ?
$description = "hello all my age is <code> $age = date("Y/m/d"); </code> years old"; // this is a result from mysql data base
$description preg_replace("[<code>]", "' "; eval(' , $description);
$description preg_replace("[</code>]", " '); echo " '", $description);
echo "$description"; // this print: echo "hello all my age is"; eval( '$age = date("Y/m/d"); '); echo " years old ";
any good idea ?
eval problem
Moderator: General Moderators
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: eval problem
Haven't you already got a thread open for a very similar problem?
From reading your post, it sounds like you've already solved the problem. You need to post a specific question and show what you've already done including what your existing code actually produces. Also, please use [ php ] tags when posting code, and try to write better English if possible.
From reading your post, it sounds like you've already solved the problem. You need to post a specific question and show what you've already done including what your existing code actually produces. Also, please use [ php ] tags when posting code, and try to write better English if possible.