- Daddy Fantastic
- Jun 22, 2002
-
For the glory of FYAD
|
Are there any benefits to using MDB2, assuming I'm already using mysqli prepared statements, won't be switching away from mySQL, and I'm not already using PEAR?
|
#
¿
Mar 22, 2008 19:07
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
¿
Apr 29, 2024 10:36
|
|
- Daddy Fantastic
- Jun 22, 2002
-
For the glory of FYAD
|
Is there a fancy one line PHP trick that could replace this foreach loop?
code:$b = array( 'dookie', 'poop', 'gook', 'poon' );
$password = //randomly generated phoenetic password
foreach ( $b as $word )
{
if ( strpos( $password, $word ) !== false )
$password = //try again from scratch...
}
|
#
¿
Mar 25, 2008 18:15
|
|
- Daddy Fantastic
- Jun 22, 2002
-
For the glory of FYAD
|
duz posted:
php:<?
if (in_array($password, $b))
{
// whatever
}
?>
I'm not sure that will work though, since $password could be any length-- in other words, I'd like it to match words that include the banned words, but may contain other letters (like dookieq).
|
#
¿
Mar 25, 2008 20:08
|
|