From Perl to PHP

March 9, 2010 - 9:28 am
  • I need to know the equivalent of some perl code in PHP.
    ----------
    $forumid,$threadid,$threadposts,$forumcategory,$fo rumname,$threadsubject,$threaddescription,$threadl astpost,$startedby = split(//,$discussion);
    ----------
    and
    ----------
    $random = int(rand 100000);
    $output =~ s/$random/$random/g;
    $output =~ s/$boardtitle/$boardtitle/g;
    ----------


  • ANyone????


  • list ($forumid,$threadid,$threadposts,$forumcategory,$f orumname,$threadsubject,$threaddescription,$thread lastpost,$startedby) = preg_split ("//", $discussion);
    Untested, but I'm pretty sure this will work.


  • Instead of preg_split() just use explode().


  • Are you trying to convert BoardPower to PHP? Because I think that's boardpower code up there :)







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about From Perl to PHP , Please add it free.