Jump to content

help with eregi()


AviNahum

Recommended Posts

hey...

i got problem with this code:

	$post_eregi = $this->post['post'];
	$closed_text = "*נעול*";
	$the_e = eregi($closed_text, $post_eregi);

	if ( $the_e ) {
		$this->topic['state']  = 'closed';
	}

 

i got this error:

Warning: eregi() [function.eregi]: REG_BADRPT in /home/aviavi/domains/avi.one-serv.net/public_html/oh/sources/lib/post_reply_post.php on line 243

 

in this line:

$the_e = eregi($closed_text, $post_eregi);

 

and i cant solve that...

this code run in invision power board system...

thanks to helpers...

Link to comment
https://forums.phpfreaks.com/topic/147051-help-with-eregi/
Share on other sites

eregi is being depreciated. Better to use preg_match

 

What is the goal of the script. Please provide what is being input and what you expect the output.

 

Also what are possible values of $post_eregi ?

 

$the_e = preg_match("~(\*נעול\*)~i", $post_eregi);

 

Give that a try and see if it works for you.

 

Edit, it converted that text to the ascii, replace that with everything between the *'s

Link to comment
https://forums.phpfreaks.com/topic/147051-help-with-eregi/#findComment-772028
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.