Hi guys,
I am working on my PHP script as I want to add the value in the variable to add it to 5 hours forward.
When I use this:
<?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 a DOM object
$html = new simple_html_dom();
// Load HTML from a string
$html->load($str);
//output1
$title1 = $html->find('li[id=row1-1]', 0)->plaintext; // with this
$title1 = preg_split("/ {6,}/",$title1);
$time1 = $title1[1];
echo '<span id="time1">'.$time1.'</span> - <span id="title1">'.$programme1. $programme1_bbf. $programme1_cat.'</span><br></br>';
It will show this as the output:
5:00 PM
I want to add the hours in the variable of time1
to add it to 5 hours forward, so it would show like this:
10:00 PM
Can you please show me an example of how I can add the value in the variable to add it to 5 hours forward?