Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9167513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:24:33+00:00 2026-06-17T15:24:33+00:00

This code: $query = array( var => no, not_var => yes, var2 => maybe

  • 0

This code:

$query = array(
    "var" => "no",
    "not_var" => "yes",
    "var2" => "maybe"
);
print http_build_query($query);

Outputs:

var=no¬_var=yes&var2=maybe

This happens on my own machine running PHP 5.3.19. I’ve reproduced this behavior on PHPfiddle. It works as expected on ideone.com running PHP 5.2.11.

Why does this happen?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:24:34+00:00Added an answer on June 17, 2026 at 3:24 pm

    This is only because of your browser encoding the &not entity, try this:

    print htmlentities(http_build_query($query));
    

    For normal usage, it will be absolutely fine.

    The reason it’s different on ideone vs PHPFiddle is because PHPFiddle just dumps the results into an iframe, and ideone is displaying it pre-entity encoded so that other displays aren’t broken.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: var query = _cityRepository.GetAll( u => u.PartitionKey == pk &
I want to rewrite http://website.com/?slug=product_info.php&products_id=32 to http://website.com/product_info/32 and I use this code, add_filter('rewrite_rules_array','wp_insertMyRewriteRules'); add_filter('query_vars','wp_insertMyRewriteQueryVars');
this code will not pass the query string to default3.aspx on Image Button ..
This code does not throw an error but the query fails, that is, the
This code is what i have tried to process the query, either delete or
This code is for my follower system. I want to query the database to
Im using this code: protected String getContactInfo() { Cursor cursor = getContentResolver().query(ContactsContract.Data.CONTENT_URI, null, null,
I'm trying to delete with qt with this code: int jobId = 655; query.prepare(DELETE
$(#epFilter).keypress(function(){ query = $(#epFilter).val(); alert(query); }); In this code, whenever I type in my
i have this query (linq to entity) : var query = from p in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.