note 75335 added to function.array-slice

From: Date: Thu, 24 May 2007 14:29:11 +0000
Subject: note 75335 added to function.array-slice
Groups: php.notes 
Request: Send a blank email to php-notes+get-126868@lists.php.net to get a copy of this message
This function returns a text string that is limited by the word count. This funtion is particularly useful for paid advertising where you pay by the word. function limitText( $text, $wordCount ){ $wordArray = explode(" ", $text); array_splice($wordArray, $wordCount); return implode( " ", $wordArray ); } ---- Server IP: 194.145.210.3 Probable Submitter: 82.71.54.14 ---- Manual Page -- http://www.php.net/manual/en/function.array-slice.php Edit -- https://master.php.net/note/edit/75335 Del: integrated -- https://master.php.net/note/delete/75335/integrated Del: useless -- https://master.php.net/note/delete/75335/useless Del: bad code -- https://master.php.net/note/delete/75335/bad+code Del: spam -- https://master.php.net/note/delete/75335/spam Del: non-english -- https://master.php.net/note/delete/75335/non-english Del: in docs -- https://master.php.net/note/delete/75335/in+docs Del: other reasons-- https://master.php.net/note/delete/75335 Reject -- https://master.php.net/note/reject/75335 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126868) next »