Results 1 to 3 of 3

Thread: Call function via a string name

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Resolved Call function via a string name

    Let's say I have a "post" and "list" strings and I would like to call Post class and invoke the list method. How do I do that?

    Thanks in advance.
    Last edited by nebulom; Jul 25th, 2007 at 10:04 PM.

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Call function via a string name

    call_user_func(array('Post', 'list'));

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: Call function via a string name

    Thanks a bunch PG

Posting Permissions

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



Click Here to Expand Forum to Full Width