$url = ((!empty($_SERVER['HTTPS'])) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$url = explode('?', $url);
$url = $url[0];
$name = trim($_POST["cname-your-name"]);
$phone = trim($_POST["cphone-your-phone"]);
$text = trim($_POST["ctext-your-text"]);
$arr = array(
'name' => $name,
'phone'=> $phone,
'text' => $text,
'url' => $url
);
echo json_encode($arr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
<div class="sect-clients">
<div class="container">
<?php if( have_rows('slider_home_clients', [$post_id = 14] ) ): ?>
<div class="clients-slider">
<?php while( have_rows('slider_home_clients', [$post_id = 14]) ): the_row();
$yak_image_klient = get_sub_field('kartinka_slajda_klientov');
$yak_imageurl_klientov = $yak_image_klient ['sizes']['medium'];
?>
<div class="clients-slide"><img src="<?php echo $yak_imageurl_klientov; ?>" alt="alt"></div>
<?php endwhile; ?>
</div>
</div>
<?php endif; ?>
<div class="clients__arrows">
<div class="container">
<div class="c_prevArrow c_arrow"><i class="fa fa-angle-left"></i></div>
<div class="c_nextArrow c_arrow"><i class="fa fa-angle-right"></i></div>
</div>
</div>
</div>
$data_str = json_encode($data, JSON_UNESCAPED_UNICODE, JSON_UNESCAPED_SLASHES);
так не работает