• Resolved shopandstore

    (@shopandstore)


    hello,

    if i have a page on my site (named “WORD”),
    i want the function to understand that value.

    i use
    $_GET[‘page_id’]=strtoupper(word);
    but it doesn’t work. if my site has a page “word” (with lowercase), than the function works. but i want to get the uppercase value. i need this..

Viewing 6 replies - 1 through 6 (of 6 total)
  • Anjara

    (@hiteshanjara)

    If you want to use strtoupper php function then you need to put the string with ” quotation mark(double quota)

    Like this strtoupper(“word”);

    Or you can assign variable and put it:

    $str = "word";
    $str = strtoupper($str);
    echo $str;

    Let me know if you want any more help.

    Thread Starter shopandstore

    (@shopandstore)

    thanks! but it doesn’t work too. strtoupper() function doesn’t need double quotation at all, it works well:
    strtoupper(word); gives you = WORD,
    but the whole function, which has
    $_GET[‘page_id’]=strtoupper(word);
    can’t find the page named mysite.com/WORD, but it searches again for the page mystie.com/word” (with lowercase).
    everything works well for posts, but i want for pages..

    Thread Starter shopandstore

    (@shopandstore)

    esmi,
    Fatal error: Call to undefined function get_page_by_title()

    What version of WordPress are you using?

    Thread Starter shopandstore

    (@shopandstore)

    3.31.
    oh , it may be bug, because everything works for posts, but not for page.

    Thanks mates, don’t bother any much.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with $_GET['page_id']=’ is closed to new replies.