Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Angry PHP Function going crazy!!

    Ok now this is one odd problem I'm having here.
    My called PHP functions just go berserk on me, they show up in a completely different DIV than the one they were called from.

    I call them like this:
    PHP Code:
    $time user_times($id,$week);
    echo 
    '<div>'.$time.'</div>'
    And instead of being returned to the DIV the show up in a parent DIV.
    Now I've tried all kinds of ways to fix this yet without any result.

    Hope you guys can help,

    John

  2. #2
    Supreme Master coder!
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    10,080
    Thanks
    10
    Thanked 1,158 Times in 1,149 Posts
    Show us the function.
    If the function is outputting stuff (echo), then that's your problem.

  3. Users who have thanked mlseim for this post:

    lamasu (09-23-2011)

  4. #3
    Senior Coder
    Join Date
    Apr 2010
    Posts
    1,760
    Thanks
    83
    Thanked 110 Times in 109 Posts
    Are you naming your div tags?

  5. #4
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Yes i'am naming the tags they're just an example.
    Wow now I feel stupid obviously you can't have a double echo.
    My function has got an echo Oops!

    Thank you guys


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •