• Hello there,

    Simple question

    I want to know how I can check if there is a letter next to ‘?’ or not

    eg: domain.com/?parameter

    I just want to check if ‘?’ letter have any word next to it or not. then I need to implement some code.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey, jasghar, did you want to detect this using JavaScript or PHP (or something else)?

    Thread Starter jasghar

    (@jasghar)

    @plantprogrammer Sorry for not mentioning this thing before

    I want to do detect this in php

    Moderator bcworkz

    (@bcworkz)

    All URL query string parameters (bits after the ?) will appear as key/value pairs in $_GET. If no value is passed with a parameter, the related array key will appear with an empty value. To check the URL domain.com/?parameter for “parameter”, you could do something like:
    if ( array_key_exists('parameter', $_GET )) :

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to check for a letter next to a specified letter’ is closed to new replies.