Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP Repeater

Featured Replies

Hi guys.

Basicly, I want the file to go to the very first line after it is "Done".

If its not possible to go to the first line, calling a XPTO.php file would also work. This way I would call the same file (the one that is running) and the effect would be the same as going to the first line.

Any help? I suck at programming!

Let me know if I didn't explain myself too well.


Not sure if this would work, I've been in java and not php recently (AP Comp Sci). But could this all go into a function in the php file, and then make a recursive call at the end? (recursive call means that the function will call it self again, thus the "reptition")

  • Author

Yeah. That should problably do the trick. Any ideas of how I can do it?

  • 3 weeks later...

I don't know :whistle:

Make a function called something and then call it at the end of the script again

function hello() {

//THE THING YOU WANT TO LOOP
echo "<p>Hey how are you doing?!";
echo "<br />What is your name</p>";
hello();
}

hello();

Edited by spinFIRE

Why not just use a loop?

for( $i = 0; $i < 100; $i++ ) {
// Do what you want in here...
}

So $i is set to 0, and is incremented each time it runs until $i = 99, since it'll stop when $i can no longer be less than 100.

or make a copy of the script and include it at the end :)

like so:

file.php-------file2.php

| xxxxxxxxxxx |

| xxxxxxxxxxx |

file2.php-----file.php

very last line do a

require file.php;

You may want SOME sort of conditional for that or it will endlessly keep including the php file

  • 2 weeks later...
  • Author
very last line do a

require file.php;

You may want SOME sort of conditional for that or it will endlessly keep including the php file

Worked extremly well! :thumbup

  • 4 weeks later...

The other way to get the same effet would be to use a while loop and then use ob_flush() to output the stuff at the end continuosly.

What do you want to use this for?

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.