What would be the most reliable and robust way to extract "only new" (not quoted) content from an e-mail? 6
3 I do not get any warning logged, in either the PHP error log or the postgres error log, when all I run is `pg_query('BEGIN');`
How to skip files which I don't have permission to read/access when using scandir(), to avoid all the logged errors? 2
2 The problem is more with how you select the nodes, `name()` will give you the name including the prefix, so you don't need to specify this as a separate part of the query (I think as it's the default prefix it is blank). So the value will be `AUTHOR1` etc. So change the way that you select the author nodes to just use `/*[starts-with(name(), 'AUTHOR')]`...
1 I really like Hamze GhaemPanah's [answer](/php?q=1071#a1290) for its brevity. However, there's a small bug in it.
0 If your needle will always be 1 character, use Galled's answer, it's going to be faster by quite a bit. If your $needle is a string, try this. Seems to work fine.