<?php
include("lib/LIB_parse.php");
include("lib/LIB_http.php");
# Include parse library
# Include PHP/CURL library
$web_page = http_get($target="http://www.ethiojobs.net", $referer="");
$meta_tag_array = parse_array($web_page['FILE'], "<meta", ">");
var_dump($meta_tag_array);
for($xx=0; $xx<count($meta_tag_array); $xx++)
echo $meta_tag_array[$xx]."\n";
?>
когда var_dump ($ meta_tag_array);
array (size=5)
0 => string '<meta http-equiv="X-UA-Compatible" content="IE=edge" />' (length=55)
1 => string '<meta name="keywords" content="Jobs, vacancies, Jobs in Ethiopia, Job search, recruitment in ethiopia, NGO jobs, heineken jobs, Finance Jobs, Marketing Jobs, Sales Jobs, Banking Jobs, Jobs in Addis Ababa, Jobs in Oromia, Jobs Ethiopia, IT Jobs, Management Jobs, Health care Jobs, Administrator Jobs, Accountant Jobs, Ethio jobs" />' (length=331)
2 => string '<meta name="description" content="Find latest Jobs in Ethiopia, vacancies in Ethiopia on Ethiojobs. Apply now for Ethiopian NGO jobs, accounting and finance jobs and IT jobs. Recruitment in Ethiopia." />' (length=203)
3 => string '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>' (length=68)
4 => string '<meta name="google-site-verification" content="ZtExAGSQvU8_4awYUYXKnF9Zp5WWJBv_e8CSDVy7gXc" />' (length=94)
$web_page = "https://googel.com/";
^---string
$meta_tag_array = parse_array($web_page['FILE'], "<meta", ">");
^^^--array?
Вы не можете использовать строковые ключи в строке как массив. Это просто невозможно. И если вы пытаетесь передать массив этой функции, то передача строки, очевидно, не сработает ДРУГОЙ.
php > $x = "some string";
php > echo $x['foo'];
PHP Warning: Illegal string offset 'foo' in php shell code on line 1
Других решений пока нет …