help with for loop? php

Tags
is totally not admin posting to make fake activity 
Labels
Members allowed to view this conversation
Everyone

Recursivemin

Last year (edited by admin Last year) Suspended

Need guides on learning how for loops work and when I should be using them… is the main reason why im not learning php.

Recursivemin

Last year (edited by admin Last year) Suspended

here's what I got so far:

<?php

$message = "The raids will never stop";

for (i < 5) {
$characTer = substr($message,i,1);
if(characTer == '\0') break;
else {
echo $characTer;
}
}

return 9;
?>


Adolf Hitler

Last year (edited by admin Last year) Suspended

Well, this is not when you should be using them. Here:

<?php

$message = "The raids will never stop";

echo($message);

?>

Or better yet:

<?php

echo("The raids will never stop");

?>

Recursivemin

Last year (edited by admin Last year) Suspended

Adolf Hitler - go to this post

Well, this is not when you should be using them. Here:

<?php

$message = "The raids will never stop";

echo($message);

?>

Or better yet:

<?php

echo("The raids will never stop");

?>

No.


Hey! You need to log in or create an account to do anything on this forum.

4,758 posts - 1,411 conversations - 0 members online

  • Display avatars