Jump to content

Archived

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

elis

code to disregard captilization

Recommended Posts

I have the following code:
[code]if($userpenname==($_POST['recip']))
{$output.="........."[/code]

Problem is the 'if' function is only being carried if the character cases match exactly, is there a method to get the function to disregard capitalization?

Share this post


Link to post
Share on other sites
use strtolower() or strtoupper() to covert both to same capitalization.

EDIT or use strcasecmp()

Share this post


Link to post
Share on other sites
Make them both the same type...

[code]
<?php
if (strtolower($userpanname) == strtolower($_POST['recip'])){
  // output here
}
?>
[/code]

Regards
Huggie

Share this post


Link to post
Share on other sites

×

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.