@ 2014-06-01T18:53:03Z <?php
$json = '{
"categories":{
"sermons":[
{
"title":"We Have Overcome the World" ,
"url":"http://test.solidrockchristianfellowship.com/sermons/we-have-overcome-the-world/" ,
"content":"" ,
"date":"May 22, 2014",
"datetime":"2014-05-22T13:41:49",
} ],
"events":[
{
"title":"SRCF Night of Prayer" ,
"url":"http://test.solidrockchristianfellowship.com/events/srcf-night-of-prayer/" ,
"content":"<p>Apr 4th at 7:30 pm SRCF Night of Prayer, Praise and the Word; Guest Speaker is Pastor Shirley Reid; Shekinah Glory Ministry; N. Charleston, SC</p>" ,
"date":"April 04, 2014",
"datetime":"2014-04-04T00:00:00",
}, {
"title":"Mighty Warrior" ,
"url":"http://test.solidrockchristianfellowship.com/events/mighty-warrior/" ,
"content":"" ,
"date":"April 19, 2014",
"datetime":"2014-04-19T00:00:00",
}, {
"title":"Solid Rock Spring Revival" ,
"url":"http://test.solidrockchristianfellowship.com/events/solid-rock-spring-revival/" ,
"content":"<p>SRCF Spring Revival; Guest Speaker is Apostle W. Lenard King; Pastor of New Covenant Evangelistic Center; Charleston, SC</p>" ,
"date":"April 23, 2014",
"datetime":"2014-04-23T00:00:00",
} ]
},
"pages":{
"About Us":
{
"title":"About Us" ,
"url":"http://test.solidrockchristianfellowship.com/about-us/"
},
"Bible Study with Pastor Faden":
{
"title":"Bible Study with Pastor Faden" ,
"url":"http://test.solidrockchristianfellowship.com/bible-study-with-pastor-faden/"
},
"Live Stream":
{
"title":"Live Stream" ,
"url":"http://test.solidrockchristianfellowship.com/live-stream/"
},
"Our Ministries":
{
"title":"Our Ministries" ,
"url":"http://test.solidrockchristianfellowship.com/our-ministries/"
},
"Our Mission":
{
"title":"Our Mission" ,
"url":"http://test.solidrockchristianfellowship.com/our-mission/"
},
"Our Pastor":
{
"title":"Our Pastor" ,
"url":"http://test.solidrockchristianfellowship.com/our-pastor/"
},
"Our Vision":
{
"title":"Our Vision" ,
"url":"http://test.solidrockchristianfellowship.com/our-vision/"
},
"Prayer Request":
{
"title":"Prayer Request" ,
"url":"http://test.solidrockchristianfellowship.com/prayer-request/"
},
"Service Times":
{
"title":"Service Times" ,
"url":"http://test.solidrockchristianfellowship.com/service-times/"
},
"Subscribe":
{
"title":"Subscribe" ,
"url":"http://test.solidrockchristianfellowship.com/subscribe/"
},
"Videos":
{
"title":"Videos" ,
"url":"http://test.solidrockchristianfellowship.com/videos/"
},
"What we Believe":
{
"title":"What we Believe" ,
"url":"http://test.solidrockchristianfellowship.com/what-we-believe/"
}
}
}
';
function test($jsondata){
// decode the json data for parsing
$json = json_decode($jsondata, true);
$todaysDate = date("Y-m-d");
$data = $json['categories']['events'] ;
foreach($data as $event) {
echo '<li>';
echo $event['title'];
echo $event['date'];
echo $event['datetime'];
echo '</li>';
}
}
?>
<pre><?php var_dump(test($json));?></pre>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for git.master , git.master_jit <pre>
Warning: Trying to access array offset on value of type null in /in/uOchK on line 108
Warning: Trying to access array offset on value of type null in /in/uOchK on line 108
Warning: foreach() argument must be of type array|object, null given in /in/uOchK on line 110
NULL
</pre> Output for rfc.property-hooks <pre>
Warning: Trying to access array offset on null in /in/uOchK on line 108
Warning: Trying to access array offset on null in /in/uOchK on line 108
Warning: foreach() argument must be of type array|object, null given in /in/uOchK on line 110
NULL
</pre> This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches Archived branches Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:dark mode live preview
38.63 ms | 401 KiB | 8 Q