Not working function statement
-
Hello
Thank you for awesome plugin to the wordpress. But I came up with the problem using this plugin. The problem is, whenever I want to to declare some function for example: [insert_php]
$val = ‘hello’;
function sayval($val)
{
echo “value is $val”;
}
sayval($val);
[/insert_php]
I will give me this error:”Fatal error: Cannot redeclare sayval() (previously declared in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\wordpress_osada\wp-content\plugins\insert-php\insert_php.php(48) : eval()’d code:3) in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\wordpress_osada\wp-content\plugins\insert-php\insert_php.php(48) : eval()’d code on line 6″. The solution that I found is that I just remove the code from function and it works, but I am not able to use php function, which I need to use. I checked that I declared the function only once. Could you please help me ?
Thank you,
Martin
The topic ‘Not working function statement’ is closed to new replies.