note 129997 added to function.array-key-exists

From: Date: Fri, 24 Jan 2025 18:36:25 +0000
Subject: note 129997 added to function.array-key-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-221813@lists.php.net to get a copy of this message
Was looking around, but couldn't find it, so I pieced something together. If you want to keep function naming a little consistent, you can include the following in your PHP project to find out whether a value exists in an array. function array_value_exists($value, $array) { return in_array($value, $array); } ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.84.18 (proxied: 199.34.0.250) ---- Manual Page -- https://php.net/manual/en/function.array-key-exists.php Edit -- https://main.php.net/note/edit/129997 Del: integrated -- https://main.php.net/note/delete/129997/integrated Del: useless -- https://main.php.net/note/delete/129997/useless Del: bad code -- https://main.php.net/note/delete/129997/bad+code Del: spam -- https://main.php.net/note/delete/129997/spam Del: non-english -- https://main.php.net/note/delete/129997/non-english Del: in docs -- https://main.php.net/note/delete/129997/in+docs Del: other reasons-- https://main.php.net/note/delete/129997 Reject -- https://main.php.net/note/reject/129997 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221813) next »