<a href="/search/<?= $name->name ?>">
'/search/<name:.+>' => 'site/search/',
site.ru/search/Ivanov/
site.ru/search/?name=Ivanov
foreach ($friend as $name=>$id){
$stmt = $pdo -> prepare("INSERT INTO Users (name_user) VALUES (:name)");
$stmt->bindParam(':name', $name);
$stmt->execute();
$test = $pdo->lastInsertId();
echo $test." | ";
$job = $fb->parseJobs($id);
$stmt = $pdo -> prepare("INSERT INTO Company (name_company) VALUES (:job)");
$stmt->bindParam(':job', $job['0']);
$stmt->execute();
$test2 = $pdo->lastInsertId();
echo $test2." | ";
$stmt = $pdo -> prepare("INSERT INTO company_and_users (id_company,id_user) VALUES (:id_company,:id_user)");
$stmt->bindParam(':id_company', $test);
$stmt->bindParam(':id_user', $test2);
$stmt->execute();
echo "<br>";
}