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 9059101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:53:24+00:00 2026-06-16T14:53:24+00:00

i have the following bit of code: function appear($data) { $output = ”; $unsee

  • 0

i have the following bit of code:

function appear($data)
{
    $output = '';
    $unsee = unserialize ( $data );
    if (is_array ( $nsee ))
    {
        $output .= '<table>' . "";
        foreach ( $nsee as $button )
        {
            $output .= loadbutton ( $button);
        }
        $output .= '
        <tr><td>IP</td>
        <td>' . $_SERVER ['REMOTE_ADDR'] . '</td></tr>' . "";
        $output .= '</table>' . "";
    }
    return $output;
}

function loadbutton($button)
{
    $output = '';
    $output .= '<tr>' . "";
    $output .= '<td>';
    $output .= $button ['values'];
    $output .= '</td><td>';
    $output .= $_POST [strtolower ( $button ['values'])] ;
    $output .= '</td>' . "";
    $output .= '</tr>' . "";
    return $output;
}

when i use the appear function for the english serialized data, it works perfectly and outputs fine.

But when i use it for the arabic serilaized data. everything works except the arabic letters appear as “????” and not as actual arabic letters.

I have verified the data in the database, everything is UTF-8, and everything is valid db wise and saving serilaized wise. but the output and unserialization is incorrect.

Do you know a way to fix this?
Does unserialization support arabic letters? if not then why does it save arabic letters correctly but not fetches them?

EDIT:

The problem i believe is in the call $button [‘values’].

my $button array is
array ( 'values' => 'Field Value')

no solution comes to mind. i know it should work.

SOLUTION:

The problem was in my mysql insert statement of the serialized data. i was inserting in latin. a simple, idiotic mistake.

Thank you for your help.

  • 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-16T14:53:25+00:00Added an answer on June 16, 2026 at 2:53 pm

    Make sure you have set in your HTML document:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    or have it set using an HTTP header by placing this at the TOP of your PHP code BEFORE any content is output:

    header('Content-Type: text/html; charset=utf-8');

    The browser is not using the correct character set, and is thus displaying ? in place of those characters.

    Also use:

    $output .= $_POST[mb_strtolower($button['values'], 'UTF-8')];
    

    As strtolower() will not properly lowercase multi-byte chars.

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

Sidebar

Related Questions

I have the following bit of code: protected function onEnterFrame(e:Event):void { var diff:Number; //
I have the following bit of code, simply: $(function() { $('a.add-photos-link').live('click', function(e) { $(this).colorbox({
I have problems with the following bit of javascript/jquery code: this.droppable = function(){ $('.imageWindow
I have the following bit of code: (function(){ ... var n = n ||
I have the following bit of code that reads data from the an Oracle
All, I have the following bit of code: function addPoints() { newpoints[0] = new
All, Say I have the following bit of code: select: function(start, end, allDay) {
I have the following bit of code in a method called by clicking the
I have the following bit of code that worked as expected before we upgraded
I have the following bit of code in a class method NSDictionary *shopAddresses =

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.