PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
for ($i = 1; $i <= 4; $i++) {
if (empty ($_POST['entry_{$i}']) || $_POST['entry_{$i}'] == 'http://') { $_POST['entry_{$i}'] = "empty"; }; //If entry is empty
$_POST['entry_{$i}'] = addslashes($_POST['entry_{$i}']); //Add slashes for security
}
?>
but, of course i don't work. the $_POST['entry_{$i}'] apparently doesn't work very well. but now on to the question;
Is it possible to do this somehow? Becuase i don't really want to have 10 extra lines doing it when i just could use a loop....
Last edited by vigge89 on Sun Jan 18, 2004 2:30 pm, edited 1 time in total.