You can turn string into an array using the explode function.
You can surely use this in your case, using my little demonstration:
$name = "raj|lokesh|amar";
$salary = "10000|20000|30000";
$job = "telecom|marine|shipyard";
You just set the variables.
Now turn them into exploded arrays:
$name = explode("|", $name);
$salary = explode("|", $salary);
$job = explode("|", $job);
You basically want to get all of the words between the character | and turn each word into an array item, so each word will have it's own index.
now, $name[0] (the first array index),
echo $name[0]; // echoes 'raj'
echo $name[1]; // echoes lokesh'
echo $job[3]; // echoes 'shipyard';
And now you have to loop trough these arrays and insert it in the query:
for ($i = 0; $i < count($name); $i++) {
echo $name[$i];
}
So final solution will look like this:
for ($i = 0; $i < count($name); $i++) {
$query = $pdoObject->prepare("INSERT INTO table (name, salary, profession) VALUES (:name, :salary, :jobs)");
$query->execute(array(
":name" => $name[$i],
":salary" => $salary[$i],
":jobs" => $jobs[$i]
);
}