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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Location
    Albany, NY
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Calling a PHP file inside a function

    Ok... still very new to PHP so bear with me... might not explain this quite right.

    I am trying to take the output from another php file and use it to change the value of the status variable within a multi-dimensional array. So for every member of that array, I would like to be able to check the operatorstatus.php take its output and associate it with the appropriate status.

    The problem I am having is that I am unsure how to call that file within the function, save its output to a variable, and then use either an if/else statement or case statement to change each members status based on the value of the returned variable. If anyone could point me in the right direction as to what syntax to use, it would be greatly appreciated.

  • #2

  • #3
    New to the CF scene
    Join Date
    Jul 2011
    Location
    Albany, NY
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'll take a look at those and see what I can do, thank you.

    The operator.php file is really just a function in and of itself. The output of that should be either ./images/away.gif or ./images/available.gif

    So either of those values would be what I would be checking against. I do intend on eventually creating a single php file that does everything that the two of these do. And that would rely on using functions as you recommend.

  • #4

  • #5
    New to the CF scene
    Join Date
    Jul 2011
    Location
    Albany, NY
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I went through and combined the two php files. Made the process much easier. Thanks!


  •  

    Posting Permissions

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