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

  • Home
  • SEARCH
  • 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 8900299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:04:25+00:00 2026-06-15T01:04:25+00:00

when i am using extract it shows some warnings like ‘PHP Warning: extract() [function.extract]:

  • 0

when i am using extract it shows some warnings like ‘PHP Warning: extract() [function.extract]: First argument should be an array ‘

following is the code

$HTTP_RAW_POST_DATA = file_get_contents('php://input');

ob_start();

global $mmb_core;
$data = unserialize(base64_decode($HTTP_RAW_POST_DATA));
$data =array($data);
$num  = extract($data);
  • 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-15T01:04:26+00:00Added an answer on June 15, 2026 at 1:04 am
    1. First of all, you either don’t need line $data =array($data); or don’t need to unserialize. Which one depends on the format of input. If input is serialized array, then it is enough to only unserialize it.

    2. You need to make sure that $data is an associative array. Means that EACH element in it has a string key and that key fits in variable naming rules (e.g. does not start with number). If it is array, but not an associative array, this error will be produced.

    Also this function validates whether these keys will overwrite already defined variables. So you need to use proper keys. I would use it this way

    if(is_array($data)){
      $num = extract($data, EXTR_PREFIX_ALL, "data_");
    }
    

    That will prepend each key with data_. Also will work for not associative arrays making variables like $data_0, $data_1 etc.

    For more details you better refer to official documentation

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

Sidebar

Related Questions

Using Php I would like to extract the current Url of a page including
I'm using XSLT to extract some HTML content with special characters (like   )
The manual on extract shows you can extract an array like: extract(array('one'=>1,'two'=>2)); into $one,$two...
For some days i´m battling with this issue: i´m using Jquery to extract data
I'm using CURL to extract some real estate listings. But, recently, a website changed
I want to count some rows in my database and I'm using the following
I’m using Linq to extract values from some XML. Shown below is a simplified
I'm trying to extract some extra information from a location using google map api.
I want to convert xml file using xsltproc and only extract some portions of
I am using Beautiful Soup to extract 'content' from web pages. I know some

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.