How can I add the preg_match inside the function right after the $sentence?
<?php
$name = 'Tom';
$age = '34';
preg_match("/Hi(.+) and/", $sentence , $source);
$source = $source[1];
include('functions.php');
//functions.php
function check($name,$age)
{
$sentence = "Hi, my name is ".$name." and I'm ".$age;
#Have the preg_match here
echo $source;
}
?>