|
by: yawnmoth |
last post by:
say i have the following php script:
<?
if (!is_int(strpos("a","aaa")))
// if (strpos("a","aaa") === false)
print "no match";
else print "match";
?>
when i run it, i am told there is no match, when there actually is.
|
by: Dave |
last post by:
After following Microsofts admonition to reformat my system before doing a
final compilation of my app I got many warnings/errors upon compiling an rtf
file created in word. I used the Help Workshop program: hcw.exe that's
included with Visual Basic. This exact same file compiled perfectly with no
notes, warnings or errors prior to...
|
by: julian_m |
last post by:
file AddHTML.htm:
----------------------------
This line is <b>ok</b><br>
This line is <b>ok</b><br>
This line is <b>ok</b><br>
<?PHP echo "This one has code prohibited "; ?>
This line is <b>ok</b><br>
This line is <b>ok</b><br>
----------------------------
|
by: drec |
last post by:
I am trying to right an if statment using strpos to determine if the
string exists in the variable, however I seem to be getting the wrong
effect. Here is my script.
<?php
$dn = "ABC-DEF";
$pos = strpos( $dn, "ABC-DEF" );
if ( $pos != FALSE )
{
|
by: Dana Cartwright |
last post by:
At php.net, the following paragraph is the first thing in the definition of
strpos:
"Returns the numeric position of the first occurrence of needle in the
haystack string. Unlike the strrpos() before PHP 5, this function can take a
full string as the needle parameter and the entire string will be used."
I find the reference to "strrpos"...
|
|
by: jodleren |
last post by:
Hi!
I was reading php.net for a way to find a number of characters in a
strings. Say I want to look for a b and c ind $string.
As far as I could see, there is no function for that.
So, I can either?
1) run through the string and test using in_array('a', 'b', 'c')
2) run through array and test using strpos( $items....
Where I find #2 the...
|
by: daschicken |
last post by:
Hi,
ive written the following php code. its a part of an admin form to add a text.
when adding the text %bild the script is supposed to swap that with the link to the picture already stored in the mysql db.
it works perfectly fine until the $id variable reaches "100".
I dont understand why it works for every number from 1 till 99 but not...
|
by: Tarik Monem |
last post by:
Hi, here I am again :-)
I'm trying to compare the contents of two arrays and if there's a match, then I would like to place the contents of that one index of the array into a "new" third array.
Here's the code:
$myComboVar = array();
for($someVar=0;$someVar<count($myTempArray);$someVar++)
{
|
by: Michael Sharman |
last post by:
Not quite sure what's happening here, the docs for strpos() say:
"Returns the position as an integer. If needle is not found, strpos()
will return boolean FALSE."
Looks fine, I can simply do:
if(strpos("michael", "m")
But then the docs go on to say:
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
|