<?php
$checkbox_values = get_field('job_location', $post->post_parent);
if ($checkbox_values) {
$count = 0;
foreach ($checkbox_values as $value) {
if ($count == 2) {
break;
}
$string = "$value";
$string = str_replace(" ", "-", $string);
$string = strtolower($string);
?>
<a target="_blank" href="https://jobsalert.pk/city/<?php echo $string; ?>"><?php echo $value; ?></a>,
<?php
}
}
?>