-
-
Save anonymous/c5efda1c553059813b107262595f9572 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*/ NOT WORKING /* | |
public static function prepare_strings_for_mysql_in_statement( $strings ) { | |
$wrapped = array(); | |
foreach( $strings as $string ) { | |
$wrapped[] = sprintf( '"%s"', $string ); | |
} | |
return implode( ', ', $wrapped ); | |
} | |
*/ WORKING /* | |
public static function prepare_strings_for_mysql_in_statement( $strings ) { | |
$wrapped = array(); | |
foreach( $strings as $string ) { | |
$wrapped = sprintf( '"%s"', $string ); | |
} | |
return implode( ', ', $wrapped ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment