Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3214752
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:05:52+00:00 2026-05-17T15:05:52+00:00

This Is my code http://www.ideone.com/R1P4b I’m use simple_html_dom class In end of file if

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:05:52+00:00Added an answer on May 17, 2026 at 3:05 pm

    Declare the functions isbnFromText(), isbn2Image() and imagePix() outside of getImg().

    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:

    function a() {
        function b() {
            print 'foo';
        }
        b();
    }
      
    a();
    a();
    

    prints

    foo
    Fatal error: Cannot redeclare b() (previously declared in /t.php:4) on line 3
    

    Update:

    Learn more about functions, especially example 3. It is also stated there:

    All functions and classes in PHP have the global scope – they can be called outside a function even if they were defined inside and vice versa.

    PHP does not support function overloading, nor is it possible to undefine or redefine previously-declared functions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have to use code this.setUp(http://www.remax.com/, *firefox); selenium.open(/404/index.aspx?aspxerrorpath=/public/pages/searchresults.aspx); slenium.click(link=Find a RE/MAX Office); selenium.waitForPageToLoad(30000); selenium.selectFrame(REMAX
here is the site : http://www.notrepanorama.com at the bottom left, i use a jquery
I am using PC-Lint (great tool for static code analysis - see http://www.gimpel.com/ )
I have this code: $reader = new DOMDocument(); $reader->loadHTML($shell); $xpath = new DomXPath($reader); $xpath->registerNamespace('html','http://www.w3.org/1999/xhtml');
I have this code var stats = { GetMetaData : function() { var url
This code works only in IE6 why it is? and how else i can
I have this code on my page, but the link has different names and
I have this piece of javascript which is supposed to validate on the clientside.
There is, what I think is one of the best uses of CSS over
I'm very new to the world of C++ error handling, but I was told

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.