Im looking at trying to replace all single spacing between fields with double spacing
At present my file looks like this
3 Caxxxan Maxxxet Waxxxxe Axxxxxxy Co.Kildare
but after the double spacing, I want it to look like
3 Caxxxan Maxxxet Waxxxxe Axxxxxxy Co.Kildare
The code I have so far is
Code: <?php
$fields=file('C:UsersMikeDesktop5april.txt');
foreach($fields as $i=>$field)
{
$field=str_replace(' ',',',$field);
$field=str_replace(' ',',',$field);
$fields[$i]=$field;
}
file_put_contents('C:UsersMikeDesktoptest.txt',implode("r",$fields));
?>
Any help would be great
How to grab certain words ??
I am working with this APIReturns JSON.curl http://letsbetrends.com/api/current_trendsHow to grab just the trending topics Which come after "name" : "xxxxxxxx" (the x's)Or how to
Reditecting pages based on logic
Newbie here, apologies in advance!I am trying to use the header function to forward one of any number of locations (taken from a db) based on the value of a response param:Quote<?php include
PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a file located at http://..../loginregister.php. If that test is successfull, I want to branch to
max function question
Hi All
Certain files upload, while others do not
I want to read the data from an uploaded file. Not sure why, but it only uploads for certain files. Not sure if it has to do with the size or what. Even when I comment all of the if and else
Select question
Hi,First I would like to say that php is pretty new for me.. so please don't shoot me if this should be a stupid question!But I'm a little surpized due to following..I have a search script (very large
subtract 1 from value entered in text field
HiHow do I subtract 1 from the vaue entered into a text field?Thanks
bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error everytime. i even tried changing the port number(currently is 13 daytime) but doesnt work. please
ldap connection
We are using ldap to get user information from the domain controller. It was working before. Recently I found the application is hanging at ldap_connect. It doesn't return any message. i am not sure
Character increment
Hi,I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc....The container where i am displaying this is being dynamically generated using jquery.Any help?