I have a script that pulls youtube video thumbnail from a playlist, when you hover over them, the title of the video Is displayed, I would like to remove 24 characters first which is automatically displayed in the title tag each time automatically? How do I do this? Is it necessary to do with regex, if so, how? I have the PHP code set up: By changing it you need to use the value: < To do this: Substr ($ media-> group-> title, 23); code> pre> Note that the price is 23, not 24, since the 0th character index is actually the first letter. P> div> html>
entry $ as playlist) {$ media = $ playlist-> Children ('http://search.yahoo.com/mrss/'); $ Attrs = $ media- & gt; Group-> Thumbnail [1] - & gt; a quality (); $ Thumbs = $ attrs ['url']; $ Attrs = $ media- & gt; Group-> Player- & gt; Features (); $ Video = $ attrs ['url']; $ Title = $ media-> gt; Group-> Title; $ Url = $ video; Parse_str (parse_url ($ url, PHP_URL_QUERY), $ my_array_of_vars); $ Vid_Id = $ my_array_of_vars ['v']; $ Thumbnail = '& Lt; Div style = "float: left; cursor: pointer;" & Gt; & Lt; P class = "crop" & gt; & Lt; One class = "videobox different iframe" href = "http://www.youtube.com/embed/ '. $ Vid_Id.' Autoplay = 1 & amp; hd = 1 '& lt; / a & gt; & lt; / p & gt; & lt; / lt; / div & gt;'}; Printed $ thumbnail;}? & Gt; < / Code>
$ title =
Comments
Post a Comment