Multiple Insert to php database

Asked

Viewed 43 times

0

Hello I am creating a link shortener and I wanted to put a multiple link insert type a person puts several links in an input separating each link with % or other character and each made php read the % he gives a new link already tried several things but n get someone can me help

1 answer

2


tried with the function explodes?

<?php
$campo = "link1%link2%link3";
$retorno= explode("%", $campo);
 echo $retorno[0]"<br>".$retorno[1]"<br>".$retorno[2];
?>

A string ira retornar o seguinte valor:
link1
link2
link3

Browser other questions tagged

You are not signed in. Login or sign up in order to post.