This Is my code
http://www.ideone.com/R1P4b
I’m use simple_html_dom class
In end of file
if i rung one line is no error and if i rung two line is return one error
echo getImg($text1) . "<br/>";
echo getImg($text2) . "<br/>";
error
but
echo getImg($text1) . "<br/>";
or
echo getImg($text2) . "<br/>";
Don’t error
Please help me fix it
Declare the functions
isbnFromText(),isbn2Image()andimagePix()outside ofgetImg().I don’t know exactly how PHP handles functions that are declared inside another function, but apparently, it puts them into the same scope and if you run the outer function twice, they are declared again.
Example:
prints
Update:
Learn more about functions, especially example 3. It is also stated there: