CodefyPHP FrameworkCodefyPHP Framework
  • Home
  • Community
    • Forum
    • Github
    • YouTube
  • News
  • Home
  • Community
    • Forum
    • Github
    • YouTube
  • News
home/Knowledge Base/Helpers/php_where
Popular Search:installation, codex, mail

php_where

22 views 0

Written by Joshua
August 14, 2024

Description

SQL Where operator in PHP.

Usage

<?php

use function Qubus\Support\Helpers\php_where;

php_where(string $key, string $operator, mixed $pattern): bool;

Parameters

$key (string) (required) Term to search.

$operator (string) (required) The filter to perform.

$pattern (mixed) (required) Term to check against.

Return Value

(bool) Will return true if condition matches, false otherwise.

Example

<?php

// Where dog is in ['cat', 'bear', 'chicken', 'dog']
php_where('dog', 'in', ['cat', 'bear', 'chicken', 'dog']); // true
Edit on Github

Last Updated on August 14, 2024 by Joshua

Related Articles
  • mail
  • sort_element_callback
  • php_like
  • convert_array_to_object
  • compact_unique_array
  • truncate_string

Didn't find your answer? Check out the Forum

Leave A Comment Cancel reply

You must be logged in to post a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  php_like

sort_element_callback  

  • Copyright 2025 CodefyPHP.com. All Rights Reserved

Popular Search:installation, codex, mail