Jump to content

Search the Community

Showing results for tags 'php parse array file'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I know this should be fairly simple but I have having a really hard time understanding. I can parse html using tags and elements but I am not able to parse an array. I am loading an array from a file with the structure shown: <?php error_reporting(0); $items = array( array( "name" => "A&E", "number" => "", "id"=>"I265.28459333.microsoft.com", "country" => "United States", "url" => "68952", "url2" => "playlist.m3u8?xs=", "url3" => "playlist.m3u8?xs=", "url4" => "", "stream" => "http://streams/A&E.m3u8", "image" => "http://image/generic.png", "Guide" => "http://GUIDE/AE.xml", "liveguide" => "http:///streamguideXML/A&E.xml", "cid" => "9" ), array( "name" => "ABC", "number" => "", "id"=>"0", "country" => "United States", "url" => "46476", "url2" => "playlist.m3u8?xs=", "url3" => "playlist.m3u8?xs=", "url4" => "playlist.m3u8?xs=", "stream" => "http://ABC.m3u8", "image" => "http://image/generic.png", "Guide" => "http://GUIDE/ABCHD.xml", "liveguide" => "http://streamguideXML/ABC.xml", "cid" => "14" ), ?> I load the file by using file_get_contents but from there I am kinda of lost. I seem to think it's the way the file is structured that is confusing me but not sure. I have tried: $file=file_get_contents("http://channel_list.php"); foreach($items as $item){ $a=$item->cid; } But this doesn't work at all. I know the $file is populate, I can var_dump and shows everything. I want to pick out different elements but mainly the cid. If I could get some guidance to that I can take it from there. Thanks for any help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.