Home
Forums
Articles
Glossary
Awards
Register
Rules
Members
Search
Today's Posts
Mark Forums Read
Account Login
User Name
Password
Remember Me?
Latest Articles
The basic usage of PHPTAL, a XML/XHTML template library for PHP
by
awuehr
on
11-10-2008
in
Tips & Tricks
Vulnerable methods and the areas they are commonly trusted in.
by
Village Idiot
on
11-04-2008
in
Classes & Objects
Simple way to protect a form from bot
by
codefreek
on
10-23-2008
in
Basic
The Basics On: How Session Stealing Works
by
wiifanatic
on
09-12-2008
in
Security & Permissions
How to keep your forms from double posting data
by
drewbee
on
07-03-2008
in
Tips & Tricks
IRC Channel
Join the friendly bunch on IRC...
(
#TalkPHP on Freenode
)
...Also available via a
web interface
.
See
this thread
for information on the TalkPHP Free Hugs Initiative™.
Subject to availability.
Associates
Wired Flame
ClientExec
Handy PHP
PHP Kitchen
PHP Tutorials
Insane Visions
Associates
TalkPHP
>
Search Forums
»
Search Results
Page 1 of 8
1
2
3
>
Last
»
Page 1 of 8
1
2
3
>
Last
»
Showing results 1 to 25 of 189
Search took
0.54
seconds.
Search:
Posts Made By:
Salathe
Forum:
General
07-08-2010, 07:14 PM
Replies:
6
sorting simplexml data by date
Views:
2,066
Posted By
Salathe
As with anything XML-ly, you'll need to make the...
As with anything XML-ly, you'll need to make the stylesheet aware of the namespace which you can simply do with something like:
<xsl:stylesheet version="1.0"
...
Forum:
General
07-07-2010, 09:11 PM
Replies:
6
sorting simplexml data by date
Views:
2,066
Posted By
Salathe
It is not really important that it's not your XML...
It is not really important that it's not your XML feed, so long as PHP can find, read and load the XML then you can perform some XSL transformation on it (assuming your PHP has XSL enabled).
For...
Forum:
General
07-07-2010, 06:46 PM
Replies:
6
sorting simplexml data by date
Views:
2,066
Posted By
Salathe
There are lots of different ways to do this: here...
There are lots of different ways to do this: here are three ideas.
Use XSL to transform the XML document into one which has the items sorted as you want. This has the advantage of simplicity...
Forum:
Absolute Beginners
07-07-2010, 06:40 PM
Replies:
2
includes and reading txt file
Views:
598
Posted By
Salathe
The best way to make sure the right path is used,...
The best way to make sure the right path is used, is to provide an absolute one. Commonly that means using something like __DIR__ (or dirname(__FILE__) if you're not blessed with being able to use...
Forum:
General
05-19-2010, 09:38 PM
Replies:
2
&& and || are mixed up ?? :S
Views:
669
Posted By
Salathe
Consider the cases: $_SERVER['PHP_AUTH_USER']...
Consider the cases:
$_SERVER['PHP_AUTH_USER'] !== "username" && $_SERVER['PHP_AUTH_PW'] !== "password"
-----
Username valid, password invalid: FALSE && TRUE gives Authenticated
Username...
Forum:
Advanced PHP Programming
01-09-2010, 07:28 PM
Replies:
31
Paginated Flat File DB
Views:
2,142
Posted By
Salathe
Having been shown the source file being used, the...
Having been shown the source file being used, the problem is due to the line endings. The file uses Macintosh style line endings (\r only) rather than the more usual Unix (\n) or Windows (\r\n)...
Forum:
Feedback
11-27-2009, 08:05 PM
Replies:
7
Where's the friggin RSS?
Views:
1,137
Posted By
Salathe
To quote the vBulletin manual page on this...
To quote the vBulletin manual page on this subject:
Forum:
Absolute Beginners
10-30-2009, 08:16 PM
Replies:
13
Importing comma-delimited csv file, containing commas
Views:
5,210
Posted By
Salathe
That data is different to what you posted earlier...
That data is different to what you posted earlier and is indeed a normal CSV file. How are you parsing the data? fgetcsv should have no problem with it at all.
Does this work?
<?php
$fp =...
Forum:
Absolute Beginners
10-30-2009, 03:38 PM
Replies:
13
Importing comma-delimited csv file, containing commas
Views:
5,210
Posted By
Salathe
That data appears to be not comma-separated, but...
That data appears to be not comma-separated, but tab-separated. The commas shouldn't be an issue if you specify the correct delimiter (comma in CSV, tab in TSV, etc.).
$handle = fopen("test.tsv",...
Forum:
Absolute Beginners
10-30-2009, 11:59 AM
Replies:
13
Importing comma-delimited csv file, containing commas
Views:
5,210
Posted By
Salathe
Maybe I missed it, but what's the problem? CSV...
Maybe I missed it, but what's the problem? CSV fields can contain commas if they are enclosed in quotes (or some other defined character).
print_r(str_getcsv('foo,"bar,baz"'));
/*
Array
(
[0]...
Forum:
Javascript, AJAX, E4X
09-23-2009, 09:24 PM
Replies:
4
Accessing Lenght of a string in Javascript with jQuery
Views:
6,161
Posted By
Salathe
There is no lenght property, the correct English...
There is no lenght property, the correct English word (and indeed the correct property name) would be length
Forum:
Member Introductions
08-20-2009, 12:35 PM
Replies:
5
Hello PHPIANS
Views:
672
Posted By
Salathe
Hi, did you come here for any other reason than...
Hi, did you come here for any other reason than to spam your site?
Forum:
Advanced PHP Programming
08-19-2009, 03:22 PM
Replies:
13
ImageGD
Views:
743
Posted By
Salathe
No, the function used is md5_file which creates...
No, the function used is md5_file which creates an MD5 hash of the binary contents of the file, not the file name.
Forum:
Advanced PHP Programming
08-17-2009, 10:39 AM
Replies:
4
$ary['x']= array('a'=>'y')... VS $ary['x']['a']= y...
Views:
678
Posted By
Salathe
Not a whole lot. The second is more typing I...
Not a whole lot. The second is more typing I suppose.
Forum:
Absolute Beginners
08-14-2009, 12:53 PM
Replies:
4
$_GET error
Views:
1,300
Posted By
Salathe
You need to check if the year was provided, if...
You need to check if the year was provided, if not use current as a default.
$year = isset($_GET['year']) ? $_GET['year'] : 'current';
Forum:
Javascript, AJAX, E4X
07-29-2009, 09:57 AM
Replies:
6
RegEx
Views:
814
Posted By
Salathe
I assume you also want to keep hyphens since they...
I assume you also want to keep hyphens since they represent where whitespace is in the article title. Here's an amended version of your function, the two regular expressions have been changed to...
Forum:
Advanced PHP Programming
07-27-2009, 08:51 PM
Replies:
2
Extending DOMDocument with Zend Framework
Views:
1,398
Posted By
Salathe
CSS-style selectors get translated to XPath...
CSS-style selectors get translated to XPath under-the-hood. Wherever Zend's wrapper makes the call through to DOMXPath::query (http://php.net/domxpath.query), you'll have to provide a context node as...
Forum:
Absolute Beginners
07-20-2009, 11:13 AM
Replies:
6
Give me remove special characters from a string, plz
Views:
2,310
Posted By
Salathe
You could also use a single call to preg_replace...
You could also use a single call to preg_replace with multiple patterns/replacements.
$subject = 'This is bullshit M$ Word. They make me 100% crazy.';
$search = array('/[^a-z0-9 ]+/i', '/...
Forum:
The Lounge
07-16-2009, 02:29 PM
Replies:
59
Answer then Ask
Views:
2,132
Posted By
Salathe
A: Oh boy, so many to choose from. Because I...
A: Oh boy, so many to choose from. Because I can't give a single favourite, here's a whole bunch that I love (in no particular order): Bananaman, Family Ness, The Raccoons, SuperTed, Paddington Bear,...
Forum:
General
07-16-2009, 08:40 AM
Replies:
2
object(Closure)#1 (0) { }
Views:
754
Posted By
Salathe
That type of anonymous function creates an...
That type of anonymous function creates an instance of the Closure class, which has the magic __invoke method used when the function is called. Only that type of anonymous function is an object,...
Forum:
General
07-14-2009, 01:12 PM
Replies:
3
php define usage
Views:
909
Posted By
Salathe
Your FILEPATH value starts with a forward slash,...
Your FILEPATH value starts with a forward slash, so it's an absolute path. It looks like you'll want "./uploads/" to make it relative to the current working directory.
Forum:
General
07-10-2009, 10:20 PM
Replies:
16
help on making my own crawler
Views:
1,936
Posted By
Salathe
No, don't do that. They'll silence more than you...
No, don't do that. They'll silence more than you want to keep quiet. If you want the XML parser to stay shushed, you can turn on user-error-handling for libxml temporarily whilst you parse the...
Forum:
The Lounge
07-02-2009, 09:27 PM
Replies:
14
yay 1000 posts!
Views:
798
Posted By
Salathe
Bless the lovable chatterbox, you've been a...
Bless the lovable chatterbox, you've been a little quiet in recent times but have passed a great landmark. Here's to many more posts from you! :-)
Forum:
General
06-28-2009, 11:02 PM
Replies:
4
Days of running week
Views:
652
Posted By
Salathe
There are a number of ways to gather a series of...
There are a number of ways to gather a series of dates. Here are three different code snippets which all produce the same array (see below the code) but are written using different tools.
Note on...
Forum:
The Lounge
06-25-2009, 12:12 PM
Replies:
5
What is the point? Or so I thought......
Views:
550
Posted By
Salathe
Absolutely! There's no big mystery with...
Absolutely! There's no big mystery with frameworks, they're just there to make life easier. If one doesn't, find another one to use. :-)
Showing results 1 to 25 of 189
Page 1 of 8
1
2
3
>
Last
»
All times are GMT. The time now is
11:06 PM
.
Contact Us
-
TalkPHP - PHP Community
-
Archive
-
Top
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO
3.1.0
Inactive Reminders By
Icora
Web Design