php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34989 Function ucwords does not work properly all the time on PHP 5.0.4
Submitted: 2005-10-26 10:18 UTC Modified: 2005-10-26 10:56 UTC
From: claudiu at daltila dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.0.5 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: claudiu at daltila dot com
New email:
PHP Version: OS:

 

 [2005-10-26 10:18 UTC] claudiu at daltila dot com
Description:
------------
I used in 2 part of the same php script function ucwords. I one part works ok...and in other part...doesn't

Reproduce code:
---------------
1.ucwords($row["h1"])
2. echo $tomb[$i]." - ".strtolower($tomb[$i])." - ".ucwords(strtolower($tomb[$i]))."<br>";

Expected result:
----------------
1. 
 Casino Affiliates
 
 
 Gambling News
 
 
 Gambling Rules
 
 
 Land Based Casinos
 
 
 Online Casinos
 
 
 Online Gambling 
2.
ONLINE GAMBLING - online gambling - Online Gambling
Home - home - home

Actual result:
--------------
1. ok
2. ONLINE GAMBLING - online gambling - online Gambling
Home - home - home

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-26 10:24 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


 [2005-10-26 10:42 UTC] claudiu at daltila dot com
The code I can send U is making part of a big project. I'm not allowed to send code example, but we can discuss on YM to see the exact site I'm working ok and to see the bug.
 [2005-10-26 10:49 UTC] tony2001@php.net
We can't fix something that we can't reproduce.

 [2005-10-26 10:56 UTC] claudiu at daltila dot com
I sent an email with my YM ID ... 
Please tell me where can I send any other contact info.
all the code that I can send...and can be usefull is:

if ($idcateg<1) $idcateg=1;
 $cat=new categ($idcateg);
 $tomb=$cat->getPathNameHtm();
 $nr=count($tomb)-1;
 $utt="";
 for ($i=0; $i<=$nr;$i++)
 {
  $utt=$tomb[$i]." -> ".$utt;
  echo $tomb[$i]." - ".strtolower($tomb[$i])." - ".ucwords(strtolower($tomb[$i]))."<br>";
 }
 $utt=substr($utt, 0, strlen($utt)-4);
 $ft->assign("LOCATION", $utt);

and the result U can see on
http://www.theonlinegamblingdirectory.com/online_gambling.htm
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 17 22:01:26 2024 UTC