SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Addict Kysmiley's Avatar
    Join Date
    Dec 2004
    Location
    Isonville KY
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    putting functions together

    I have not seen anywhere that there is a "and" command for PHP so If i have two functions I want one to preform then the other next then another. How do you tie them together with out an and command. Just a question I am trying to get my head around.
    Pat

  2. #2
    Web Professional
    Join Date
    Oct 2008
    Location
    London
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kysmiley View Post
    I have not seen anywhere that there is a "and" command for PHP so If i have two functions I want one to preform then the other next then another. How do you tie them together with out an and command. Just a question I am trying to get my head around.
    Pat


    PHP Code:
    foo();
    bar();
    baz(); 
    That was easy, no?

  3. #3
    SitePoint Addict Kysmiley's Avatar
    Join Date
    Dec 2004
    Location
    Isonville KY
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In other words you just place functions one after the other and there is no and or no tie together?
    Pat

  4. #4
    Web Professional
    Join Date
    Oct 2008
    Location
    London
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Correct.

  5. #5
    SitePoint Zealot
    Join Date
    Dec 2006
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're trying to send the results of one to the next you could do this:
    PHP Code:

    foo
    (bar($input)); 


Bookmarks

Posting Permissions

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