I have the following script in php:
<?php
$my_array_of_vars['v'];
$row['comment'] = "<img src='http://img.youtube.com/vi/xxxxxx/hqdefault.jpg' title='YouTube Video' alt='YouTube Video' /> ";
?>
All I want is to replace the "xxxxxx" with the result in variable $my_array_of_vars['v']; I have tried a lot of things but always getting wrong result. Any idea how to do this please?
This is what I have tried:
<?php
$row['comment'] = "<img src='http://img.youtube.com/vi/$my_array_of_vars['v']/hqdefault.jpg' title='YouTube Video' alt='YouTube Video' /> ";
?>