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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:34:19+00:00 2026-06-18T07:34:19+00:00

WORD AŠA PHP <?php foreach (glob(*.jpg) as $filename) { $search = array(Š); $replace =

  • 0

WORD

AŠA

PHP

<?php

foreach (glob("*.jpg") as $filename) {
    $search = array("Š");
    $replace = array("S");

    $newname = str_replace($search, $replace, $filename);
    echo $filename.'<br>'.$newname;

    //($filename, realpath(dirname(__FILE__)).'/'.$newname);
}

PROBLEM
It does not replace character “Š” in word “AŠA”

  • 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-18T07:34:20+00:00Added an answer on June 18, 2026 at 7:34 am

    Take a look at iconv() which allows you to convert a string to a specified encoding.

    Example for your case:

    $str = 'AŠA';
    $str = iconv('UTF-8', 'ASCII//TRANSLIT', $str); // ASA
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: <?php foreach ($galerije as $gal): ?> <h1><?php echo str_replace('_', '
I'm trying to search for a word/phrase within all the php files and all
I'm writing an application in PHP, and I need to replace any word between
I want to replace word groups by links. I use a multi-dimensional array to
Hey guys here is my php: $x = array(one, two, three); foreach ($x as
I'm looking for a way to make word-wrap in PHP a bit smarter. So
I am exporting data from php page to word,, there i get 'n' number
Is there any function in PHP to make the first character of the word
I'm writing a blacklist word checker. I've named the script as blacklist_check.php and it
I'm using a PHP script to link each word of the string: <? $str

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.