How do I make a case-insensitive comparison with PHP?

This is what I have tried so far:
if (strcasecmp($var, "ComparedString") == 0)
$error = 1;
...but it doesn't seem to work.

You are looking to see if they are equal? Your code should
work to set
$error to true/1 if the two are equal. Is it not doing this?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"AngryCloud" <[email protected]> wrote in
message
news:fkbm59$g70$[email protected]..
> This is what I have tried so far:
>
> if (strcasecmp($var, "ComparedString") == 0)
> {
> $error = 1;
> }
>
> ...but it doesn't seem to work.

Similar Messages

  • Case Insensitive Comparison in Oracle 9i

    hi all
    in Oracle 10g we have the following statement to enable case-INsensitive comparison:
    ALTER SESSION SET nls_sort=binary_ai
    do we have somthing like this in Oracle 9i to enable case-INsensitive comparison
    thnx
    Ashu :)

    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    JServer Release 9.2.0.7.0 - Production
    SQL> create table t as select 'télé' t from dual
    union select 'TÉLÉ' from dual
    union select 'tele' from dual
    union select 'TELE' from dual
    union select 'Bebe' from dual;
    Table created.
    SQL> alter session set nls_comp=ansi;
    Session altered.
    SQL> ALTER SESSION SET NLS_SORT=GENERIC_BASELETTER;
    Session altered.
    SQL> select * from t where t='tele';
    T
    TELE
    TÉLÉ
    tele
    télé

  • How do I make a hands free call with the iphone 4s?

    How do I make a hands free call with the iphone 4s?  I have a bluetooth car device and when I try to talk through it (as I did with my old phone) to call someone it does not work.  so far only hte last person called is redialed.

    That is a carrier-based service. So first you have to make sure your service contract includes that feature.
    It usually also includes Call Hold. So you call the first party, put them on hold, call the second, then reactivate the first. But only if your carrier allows you to.

  • How can i make a coppy both side with my hp 6500a plus all in one?

    how can i make a both sides coppy with my hp 6500A plus all-in-one?

    For windows:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02773085&cc=us&dlc=en&lc=en&product=4083977&tmp...
    For MAC:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01935823&cc=us&dlc=en&lc=en&product=4083977&tmp...
    Although I am working on behalf of HP, I am speaking for myself and not for HP.
    Love Kudos! If you feel my post has helped you please click the White Kudos! Star just below my name : )
    If you feel my answer has fixed your problem please click 'Mark As Solution' and make it easier for others to find help quickly : )
    Happy Troubleshooting : )

  • How do I make my iPod classic work with iTunes 9.1

              How do I make my iPod classic work with iTunes 9.1?

    You are correct in some of your assertions, Limnos but, if I were to follow Apple's wishes, I would have to purchase the latest and greatest Apple product every month!  I refuse to do that.  I understand that my G4 is old but, it does what I need it to do.  To answer your question though, I purchased the iPod classic as a refurbished unit, about 5 years ago and had it replaced three times, since then so, there is no way for me to know how old it is.
    From my knowledge of how the Classics work(which is extensive.)  It is basically a hard disk.  There should be of performing a low level format, plug it back in and the G4 should recognize the ROm and automatically search for the correct software associated with that version of iPod and load it but, Apple will most likely no longer carry the software on their servers anymore!(surprise,surprise.)

  • How can I make a query by date with several TDMS files?

    Hi,
    I have a project that can write and read TDMS files everyday (a file for each day with date and time). There, I can import those files to excel (I choose a file and load it). But, I have a question: How can I make a query by date with those TDMS files? I'd like make a time stamp for start date and stop date, where I could compare the TDMS file dates and sum the values that are in the channels where these files are similar. For example, I save a file with "02/01/2013" name, in other day "03/01/2013", in other day "04/01/2013"... so, i'd like put in time stamp for start date "02/01/2013" file and to stop date "04/01/2013" file, than, sum all values that range with my TDMS files existing. How can I make that? 
    Thanks all,
    Val 

    Hello Val_Auto.
    You're Brazilian, no? Me too. = ^ - ^ =
    I converted VI to version of your LabVIEW (8.5). Is attached in this reply.
    This VI search all your TDMS in a range of dates and join them in a single TDMS. I hope this is what you wanted.
    Query TDMS is the main VI. The TDMS VI Search changes the date format that out from calendar control (which is DD / MM / YYYY) to DD-MM-YYYY. This is because you can't name files using "/". I chose "-" but, if necessary, you should change to keep the same format of your TDMS files.
    If you have any doubt as to its operation or how to make changes to adapt VI for your application, keep at your disposal.
    Thank you for your contact; I hope have helped you and succeed in your application.
    Wesley Rocha
    Application Engineer
    National Instruments Brazil
    Visite a nossa comunidade em PORTUGUÊS!!!
    Attachments:
    Query TDMS.vi ‏62 KB
    tdms search.vi ‏24 KB

  • How do you make a page scroll horizontally with mouse wheel?

    As the title says, how do you make a page scroll horizontally with mouse wheel in edge animate?

    This should get you there
    http://css-tricks.com/snippets/jquery/horz-scroll-with-mouse-wheel/
    1. Load the mousewheel min script via CDN (jquery-mousewheel - cdnjs.com - the missing cdn for javascript and css)  into the Scripts Panel;
    2. Add the provided snippet into your Stage > compositionReady event handler.
    hth
    Darrell

  • Case insensitive selects with 'like'

    I use a 10g database (10.2.0.2 same behaviour with 10.2.0.1). What we want is case insensitive selects with 'like' operator in the where clause. NLS_COMP is set to 'LINGUISTIC' and NLS_SORT is set to 'BINARY_CI.
    In a table we have two columns one of type 'varchar2' one of type 'nvarchar2'. The databases national character set is set to UTF8. Case insensitive sorting works with both columns. Select statements with '.... where varchar2col like '%r%' returns also values with upper case 'R' values (that is what I expect).
    The select statements with '.... where nvarchar2col like '%r%' however does not return the row with upper case 'R' values.
    I used SQL*Plus: Release 10.2.0.3.0 and other clients and the behaviour is the same so
    I think it is not client related.
    Is that a known issue or is there any other parameter to set for UTF8 nvarchar columns?
    Any hint is very much appreciated! Here are the nls settings in database, instance and session:
    DPARAMETER      DVALUE IVALUE SVALUE
    NLS_CHARACTERSET WE8ISO8859P1
    NLS_COMP      BINARY LINGUISTIC LINGUISTIC
    NLS_LANGUAGE      AMERICAN AMERICAN AMERICAN
    NLS_NCHAR_CHARACTERSET UTF8
    NLS_RDBMS_VERSION 10.2.0.1.0
    NLS_SORT BINARY BINARY_CI BINARY_CI
    NLS_TERRITORY      AMERICA AMERICA AMERICA

    OK. Found out what the problem is. It is obviously the client.
    While using the instant client and setting the parameters (NLS_SORT=BINARY_CI and NLS_COMP=LINGUISTIC) as environment variables does not work correctly, at least not for nvarchar2 fields. The nls_session_parameters show the correct values, but selects with 'like' operators in the where clause do not return case insensitive. Issuing the 'alter session' commands and again setting the nls parameters solves the problem.
    Using the full client installation also works, in case the parameters are set in the registry on windows systems. With the full client it it not necessary to issue the 'alter session' commands again.
    So obviously the problem is instant client and nvarchar2 field related. That's too bad....

  • HT201303 how can i make my photo be entered with a password

    how can i make my photo be entered with a password

    Photo?  You cannot separately password protect a photo.
    You can password protect your iPhone at Settings > General > Touch ID & Passcode

  • How can I make a graphic (scatter chart) with 1 "y", but multiple "x" (to make a multiple linear regression)?

    how can I make a graphic (scatter chart) with 1 "y", but multiple "x" (to make a multiple linear regression)?

    Émilie,
    The default for X-Y Charts is for X values not to be shared, so it's entirely possible for you to create X-Y pair sets that have common Y-values and independent X-values.
    This answer assumes, as always, that I properly interpreted your problem statement. A linear fit line for each pair set should satisfy.
    Jerry

  • How can I make Aperture share on Flickr with sRGB?

    Since I upgraded to 3.3, all photos I share on Flickr have an embedded Adobe RGB profile. Changing Web Export presets has no effect; neither does any other setting I can find. How can I make Aperture share the images with sRGB instead of Adobe RGB?

    If it is possible you do it by changing the print product country in the iPhoto preferences
    LN

  • HT204053 I just changed my apple ID, how can I make my icloud link up with my new ID?

    I just changed my apple ID, how can I make my icloud link up with my new ID?

    Did you simply change the primary email address of your existing AppleID at
    https://appleid.apple.com/
    Or, did you create a new AppleID.  If you created a new AppleID, then you cannot.  All you can do is use the iCloud with the old AppleID, or create a new iCloud account with the new AppleID.
    If you changed the primary email address of the exisitng AppleID, you may need to uninstall the iCloud account on the iPhone and reinstall it to get it to use the new email address and password (you won't loose anything, its just there a means of resetting the cached credentials associated with the iCloud account).

  • HT4111 how do you make the hippih keyboard pair with an ipad

    how do you make the hippih keyboard pair with an ipad

    I know this question is old but I just found out the real answer. After you turn on the little switch on the left side of the HIPPIH AppsKey Keyboard and the blue light blinks, I want you to look just above it.   Do you see that hole right above the word PAIRING?  Go grab a paper clip and press down in to the hole for about 2 seconds.   This sends a signal to the ipad and in the BLUETOOTH menu you should see "Keyboard" under DEVICES. Click on it and dialogue box will pop up asking you to put in a passcode for the keyboard.
    It took me way too long to figure this out.
    Stupid recessed button.

  • How do I make search case sensitive

    I created a search region of type "query" using a simpleSearchPanel. The instructions say the search is case-sensitive when running the page but it appears it is not. Can anyone tell me how to make the search case sensitive?

    Please check if you have followed these guidelines
    Rule 2 : If your view attribute is of type String(VARCHAR2), and if the item has the Selective Search Criteria property set to false, then OA Framework generates a case-insensitive simple WHERE clause based on the CRITERIA_CONDITION and the CRITERIA_VALUE.
    Rule 3: If your view attribute is of type String(VARCHAR2), and the item has the Selective Search Criteria property set to true, then OA Framework generates a case-insensitive WHERE clause using a four-way join to ensure that the index is used.

  • How can I make easier case structure? Or can it possible to have one Pause and reset button in same structure.??

    hello,
    I am tring to convert my main test vi in case structure so latter on i can make some changes in that for example i want creat one pause button and reset button in that.
    I am not so much familer with case structure i want your guidence that how can i make my vi in globle case stucture in that i m having case 1 ,case 2...
    i already tried for that but then i got confused.
    here i am attaching my .llb file in that aa.vi is my main testing vi.
    will you plese guide me so i can make confort vi in case structure.
    Or can it possible to have one pause button and one reset button in same stucture,so User can pause or reset execution at any time when they want.
    Thank you very much in advance.
    Attachments:
    aa.llb ‏3338 KB

    Hello,
    I have change my entire structure ,now is it possible to have pause and reset button.
    here i have attached my changed vi.
    if still any changes required then please suggest me.
    Thank you.
    Attachments:
    aa.vi ‏75 KB
    aa1.llb ‏3333 KB

Maybe you are looking for