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

This is the complete source code: http://www.sendspace.com/file/lwxpyf I have a problem with a JSF
I use this code http://www.openjs.com/scripts/events/keyboard_shortcuts/index.php for handling keyboard shortcuts. shortcut.add(Ctrl+Z,function() { setTimeout(function() { var
I'm working on a picture select/crop program and using this code below: http://www.androidworks.com/crop_large_photos_with_android/comment-page-1#comment-969 As
I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still
I copied this code (in spanish) http://www.elrincondelc.com/nuevorincon/index.php?pag=codigos&id=4 and wrote a new one. This is
I am using this code to send mail with php http://www.siteduzero.com/tutoriel-3-35146-e-mail-envoyer-un-e-mail-en-php.html#ss_part_4 . This code
I have found this project on Codeplex. http://www.codeplex.com/ProjNET I need to integrate this code
I have downloaded the sample code from this site for FTP Client http://www.lysesoft.com/products/andftp/index.html But
I currently have this piece of code: NSString *strURL = [NSString stringWithFormat:@http://www.sample.com /phpFile.php?firstname=%@,txtfirstName.text]; NSString
I am using this code from http://www.joe-stevens.com/2010/01/04/using-jquery-to-make-ajax-calls-to-an-asmx-web-service-using-asp-net/ function callWebService(address) { var result; $(#result).addClass(loading); $.ajax({

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.