Skip to content

Article::find_by_array

perrym5 edited this page Apr 22, 2011 · 1 revision

Description

This function querys the database for all the articles which are about one of the URLs in the given array and returns you an array of Article objects.

Prototype

array Article::find_by_array( array $urls )

Parameters

urls: Array of urls which you want the articles of.

Return Value

Returns an array of articles which have these urls.

Examples

Code:

<?php
$urls = array( "http://www.google.com", "http://www.rpi.edu/" );
$articles = Article::find_by_array( $urls );
echo $articles[0]->url;
?>

Outputs:

http://www.google.com/
Clone this wiki locally