Hello Guys,
i'm not very firm with regular Expressions, so i have to ask you:
How to find out with PHP if a string contains a word starting with @ ??
e.g. i have a string like "This is for @codeworxx" ???
I'm so sorry, but i have NO starting point for that :(
Hope you can help.
Thanks,
Sascha
...
Hi,
I am currently working on a project / website and I will need to make it available in several languages. The site was done with PHP / mysql and a lot of javascript (jQuery). I have no idea where to start and I was hoping somebody could give me some hints. I would like to know opinions about what is the best approach to take, if ther...
hi all, i want to execute a sql at php which does something like changing a text column into int column.
however, this sql failed to fun at php and succeeds in my mysql admin tool (sqlyog). server responses "1 row(s) affected. 1 warning(s)". but "SHOW WARNINGS" didn't pop up anything and not surprisingly, php's mysql_error() didn't retu...
Hi,
I would like to create an array (in php) from sql results like this:
We have the sql-table "Posts" which stores the Name and the Message.Example:
Name | Message
John | Hello
Nick | nice day
George | Good bye
John | where
What i want is to output the names of people who have posted a message but dont display...
Had to re-set up everything on my laptop recently, which included reinstalling XAMPP. While I was quite happy with the version of phpMyAdmin I had installed the first time around, the new bundled version has a few quirks that get to me. Specifically:
Auto-incremented fields ignore values I enter when inserting new rows (e.g. if I wan...
I have a database with a list of locations e.g.:
C_ID | Name
1 | Italy
2 | Germany
3 | France
4 | Spain
and in a seperate table, a list of people who are from those countries,
P_ID | Name | C_ID
1 | John | 1
2 | Mark | 1
3 | Paul | 2
4 | Pierre | 3
5 | Alan | 2
I have grabbed ...
Vim privedes nice syntax folding for ruby and c(well, that is what I've tried) out of the box, but what about php? It doesnt have this feature!
Am I missing something?
...
hey guys,
now i have an eregi_replace Problem:
I have this
$subject = "This is for @codeworxx - you have to try first!";
$text = eregi_replace('(((@))[-a-zA-Z0-9]+)','<a href="http://www.google.de/\\1">\\1</a>', $subject);
echo $text;
Everything works fine, but the
<a href="http://www.google.com/@codeworxx">@codeworxx&...
How do I go from this multidimensional array:
Array (
[Camden Town] => Array (
[0] => La Dominican
[1] => A Lounge
)
[Coastal] => Array (
[0] => Royal Hotel
)
[Como] => Array (
[0] => Casa Producto
[1] => Casa Wow
)
[Florence] => Array (
[0] => Florenciana Hotel
)
)
to this
<ul>
Camden Tow...
Greetings All!
I am having some troubles on how to execute thousands upon thousands of requests to a web service (eBay), I have a limit of 5 million calls per day, so there are no problems on that end.
However, I'm trying to figure out how to process 1,000 - 10,000 requests every minute to every 5 minutes.
Basically the flow is:
1) Ge...
Why i receive error? the class in the same namespace..
php 5.3.0
namespace ExampleSystem\Core;
class Test {
public function __construct() {
print 'Test ok';
}
}
// Fatal error: Class 'Test' not found in ...
$class_name = 'Test';
$obj = new $class_name;
// Ok
$class_name = 'ExampleSystem\Core\Test';
$obj = new $class_name...
Hi.
Investigating/researching mysql/myisam locking. trying to find a good example of how to set the lock in appA, and determine/detect the tbl lock in appB.
searching google, not seeing much, so i must be missing something.
i'm going to be writing a php app that demonstrates this process.
pointers/thoughts/thanks..
-tom
...
Hiya,
I'm trying to find a efficient way to watch the server log on a webpage, i don't mind building an app i just can't work out the best way to do it.
Is there a way to keep a stream open to a file with php and to the browser? or will it have to be done by polling the file every x seconds?
Thanks in advance,
Shadi
...
Hi,
I have an issue that is quite annoying with symfony 1.2 and propel.
I have a model where I have implemented inheritance using the single-table strategy. So, here is an excerpt of my model:
Ad (id, posted_date, description)
then RealEstateAd(location, price, transaction_type) and JobAd(position, requirements, company) which inherit bo...
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /Library/WebServer/Documents/XMLDataStore.class.php on line 981
The curious thing about this error is not the memory leak, which would be easy enough to troubleshoot. Rather, it is the fact that XMLDataStore.class.php is only 850 lines lon...
Hello, I'm using Doctrine 1.1.5 and I'd like to know if there is some option for remove table prefix from files and class names when calling Doctrine::generateModelsFromDb or Doctrine::generateModelsFromYaml.
Edit:
For example I have tables like mo_article, mo_language, mo_article_text, etc. When Doctrine generates the models (using th...
I have been looking around for a regex expression that will spit out just the 'stackoverflow' part and no www. or .com etc. All I could find was to check if the url's were valid... I have used php's url filter to determine that much I now am looking to determine which site it is.
I have never written an expression before so I am hoping ...
i have a problem.
i am using wamp server on vista machine and i am trying to do my first steps in php programming.
my problem is that my php include function dosn't work and i don't know what is the problem!!!! my code run on other servers in my work but do not run in wamp!!!!
...
so i want to do an external permanant redirect (301) from http://www.creya.com to http://creya.com.
i am not using apache but rather, abyss web server and i can't figure out the url rewrite rules. but i believe i could also do this at the app level with php.
i think wordpress does do this. i set http://creya.com/blog as your blog url ...
Here is my code to use curl:
class cURL {
var $headers;
var $user_agent;
var $compression;
var $cookie_file;
var $proxy;
var $process;
function cURL($cookies = TRUE, $cookie = 'cookies.txt', $compression = 'gzip', $proxy = '') {
$this->headers [] = 'Connection: Keep-Alive';
$this->headers [] = 'Con...