Use array syntax in the form input names to get the input as arrays:
PHP Code:
<?php
for ($i=0; $i < $_GET['url_no']; ++$i) {
?><label for="title_<?php echo $i ?>">Title:</label><input name="title[]" id="title_<?php echo $i ?>" />
<label for="url_<?php echo $i ?>">Link:</label><input name="url[]" id="url_<?php echo $i ?>" />
<?php
}
You can use count or foreach in your loop over input elements.
PHP Code:
for ($i=0; $i < count($_POST['title']); ++$i) {
... $_POST['title'][$i] ...
... $_POST['url'][$i] ...
}