469,923 Members | 1,584 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,923 developers. It's quick & easy.


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] {

Apr 8 '06 #1
1 1175
Piet wrote:
How can I stop a function in PHP?

By calling return;

function example()
return; // stop here

echo "test"; // This is never executed
Apr 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by MrCoder | last post: by
8 posts views Thread by Vincent | last post: by
11 posts views Thread by Russ Green | last post: by
5 posts views Thread by antani | last post: by
26 posts views Thread by neha_chhatre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.