compare

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Piet

    #1

    compare

    How can I stop a function in PHP?

    When comparing data I want to stop the function on a hit.



    Function compare($data) {

    For ($n=1; $n<=10000; $n++) {

    For ($m=1; $m<=10000; $m++) {

    If $data[$n]==data[$m] {

  • Aggro

    #2
    Re: compare

    Piet wrote:[color=blue]
    > How can I stop a function in PHP?[/color]

    By calling return;

    function example()
    {
    return; // stop here

    echo "test"; // This is never executed
    }

    Comment

    Working...