473,508 Members | 2,361 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to manipulate text variable

Hi,
I have a text variable $var1 = "abcdef"
how I can make $var2= "abc" and $var3 ="def" using caracter count
like mid$(var,x,y) in visual basic ?

thanks
Jul 17 '05 #1
2 1721

aprim wrote:
Hi,
I have a text variable $var1 = "abcdef"
how I can make $var2= "abc" and $var3 ="def" using caracter count
like mid$(var,x,y) in visual basic ?


Look at the function substr(). Read
<http://www.php.net/manual/en/function.substr.php>

Ken

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2542
by: Paul | last post by:
This method: static void swap(int a, int b) { int c = a; a = b; b = c; } does not swap the values of a and b over. It doesn't work for String variables either. However the following method...
1
1211
by: R Reyes | last post by:
Hi, what is the best way to manipulate MSOffice programs? i understand that regular web pages do not have the permissions (because of safety measures) to open up MS word/excel programs, for...
3
15604
by: Stewart | last post by:
Dear comp.lang.javascript, I have more than once wanted to manipulate the contents of select boxes dynamically, whilst the boxes contain <optgroup> tags. Manipulation of a select box containing...
0
1399
by: Bryan Parkoff | last post by:
I break one U_WORD variable into two U_BYTE variables. I prefer to manipulate two U_BYTE variables instead of one U_WORD variable using Carry. Please look at my example using U_WORD variable...
8
1630
by: WakeBdr | last post by:
I'm writing a class that will query a database for some data and return the result to the caller. I need to be able to return the result of the query in several different ways: list, xml,...
1
1184
by: cmk1523 | last post by:
I'm doing work with GPS and I have a file thats around 4Mb. It contains GPS information and my job is detect, correct, and output the results to another file which is in the same format. The file...
1
1158
by: Ron | last post by:
I would like to write a small program to manipulate this XML: http://www.keepitsimplekid.com/xml/Ad00304.xml What I want the program to do. it would look at all.xml documents in a directory...
2
1108
by: DC | last post by:
Hi, I am writing a "print control" routine which expects the id of a control and will then make every element but the one that is supposed to be printed invisible (only by using "display: none"...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7489
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.