You are here: How to tell php a variable is an array? « PHP Programming Language « IT news, forums, messages
How to tell php a variable is an array?

Posted by sueyic@gmail.com on 04/14/06 00:09

Hello,

What is the syntax for telling php that a variable is an array, or an
array of arrays?

Let's say I have $arrTerms

/*
@param array of arrays $arrTerms
*/
function test($arrTerms) {
$anotherArray = array('1', '2');

$intersect = array_intersect($anotherArray, $arrTerms[0]);

}

This doesn't work and php tells me I'm trying to access $arrTerms[0] as
a array though it is not.

But actually, since $arrTerms is supposed to be an array of arrays --
$arrTerms[0] is an array ... how can I tell php this?

Thanks,
sue yi

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация