php - parse error unexpected '' '' T_CONSTANT_ENCAPSED_STRING -
i'm having problem php, i'm trying create empty space make seperate other variable, i'm getting parse error unexpected '' '' (t_constant_encapsed_string), expecting ',' or ';'.
here error jumping on line:
echo '<span id="time1">'.$time1.'</span> - <span id="title1">'.$programme1.' ' ' '.$programme1a.'</span><br><br>'; here php
<?php $links = $row['links']; $html = file_get_html($links); $base = $row['links']; $curl = curl_init(); curl_setopt($curl, curlopt_ssl_verifypeer, false); curl_setopt($curl, curlopt_header, false); curl_setopt($curl, curlopt_followlocation, true); curl_setopt($curl, curlopt_url, $base); curl_setopt($curl, curlopt_referer, $base); curl_setopt($curl, curlopt_returntransfer, true); $str = curl_exec($curl); curl_close($curl); // create dom object $html = new simple_html_dom(); // load html string $html->load($str); //output1 $title1 = $html->find('li[id=row1-1]', 0)->plaintext; // $title1 = preg_split("/ {4,}/",$title1); $time1 = $title1[1]; $programme1 = $title1[2]; $programme1a = $title1[3]; echo '<span id="time1">'.$time1.'</span> - <span id="title1">'.$programme1.' ' ' '.$programme1a.'</span><br><br>'; ?> does know how can create space in echo allow me make seperate other variable?
the reason i'm doing because have got output show looks this:
9:00 pm - ncis"alleged" i'm trying make looks this:
9:00 pm - ncis "alleged"
if want provide space can use
echo '<span id="time1">'.$time1.'</span> - <span id="title1">'.$programme1.' '.$programme1a.'</span><br><br>';
Comments
Post a Comment