nice with it?
I'm running PHP 5.3.15, Zend Code Analyzer 1.2.2
thnx,
Christoph
I am trying to use this while look to assign them to variables:
$word_1
$word_2
$word_3
...
$word_25
This should work for you:
http://us3.php.net/manual/en/function.extract.php
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/libxml.constants.php), I don't see a way
to get access to both. Am I missing something? Or is this really not
possible?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
don't see a way
to get access to both. Am I missing something? Or is this really not
possible?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-- about how json_encode() behaves when executed as part of
the PHP script.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
line?
Is there a way I can get around this on the back end? Make it so that
it'll behave the same in all cases?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You should set the charset of your page by meta tag in its head.
Do you have a source of reference to which you point me?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to every call to json_encode() and massage the data
accordingly depending on what I find? That seems somewhat excessive.
But based on what you are saying and based on what I'm witnessing, it
seems like there is no other way around that.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net
is returned as part of the result set and encoding it
to match the charset passed in from the browser?
thnx,
Christoph
* Disclaimer : the actual code (and data repository) I am using is
slightly different from the above but is similar enough so that it's a
valid representation
--
PHP General Mailing List
for Exception([string $exception [, long $code ]])
and the line number it dies on is the line in the
MyException::__construct() where it is calling the parent's
constructor. So what's going on? Is the documentation wrong? Is
this a bug? Am I doing something wrong?
I'm using PHP 5.2.9.
thnx,
Christoph
I've looked through the docs but was unable to find out if this is possible;
I hope it is. Is there a way that you get the size/length of the collection
to be iterated (e.g. the total number of files) without having to iterate
through at least once?
thnx,
Christoph
... :(
thnx,
Christoph
in that directory at the time the object was
constructed?
thnx,
Christoph
as $file )
{
echo $file-getFilename() . 'br';
flush();
sleep( 1 );
}
?
thnx,
Christoph
causing the error.
Could someone explain to me what I'm doing wrong?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
. ;)
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of that worked. Is there a way I
can pipe/redirect output from a command line uhh, command as input to
my script?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
suppose I could pass those arguments to my script and
access it using argv but I'm actually kind of curious how (if) I can
access output which has been piped (or redirected) to my script.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
Exactly. And if you just want redirected data you can try:
$data = file_get_contents(php://stdin);
--or--
For an array of lines:
$lines = file(php://stdin);
This is exactly what I was looking for. Thanks Shawn and Ben!
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net
with $obj inside it
$obj-thingMethod(); // Timer passes call to Timer-obj
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
both odd and wrong to me. But not nearly as wrong as fileinfo
reporting application/msword as the mime type of an excel document.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
: application/msword
The xls file I am using was generated with Excel (of Office 2007) for
the Mac. So either you have a different magic file (assuming that's
what the file command uses) than I do or different versions of excel
contain different information.
thnx,
Christoph
--
PHP General Mailing List
, the excel document I'm looking at
was created using Office 2007 for the Mac.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Office 2003 on XP
and received the same output: application/msword.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, instantiation)
I've done some looking around but haven't really been able to find
anything that does even some of this. I could write functionality
that does this but didn't want to reinvent the wheel.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
with the framework.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
['MY_NUMBER'] ) ( is_numeric(
$_REQUEST[MY_NUMBER']))) {
$iVar = $_REQUEST['MY_NUMBER'];
}
$iCalculatedValue = $x / $iVar;
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
use in the above equation, neither case is valid.
Consequently, you really should be doing some validation at some point
prior to that line.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I set it to. Is that not something
you can do for symbolic links programatically?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, many times) and I still
don't understand why '::' wasn't used. MyClass::MyStaticMethod is
utilizing namespacing. Why it was felt that '::' as the official
namespace operator would mess that up is beyond my ken. :(
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
aliases.
http://dev.mysql.com/doc/refman/5.1/en/identifiers.html
In your code, when you are referencing the column, do so using the
alias. That should solve your problem.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
['EmployeeName']
$rowData['EmployerName']
I hope that helps explain aliases a bit.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
there or if I'm just looking in the wrong
places.
Any advice/suggestions would be greatly appreciated!
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/advice would be greatly
appreciated!
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
; in the
end I opted for a CLI script which opened worker threads then
killed/restarted them when memory usage was X.
Unfortunately, that is not an option for me. It just blows my mind
that a method to free memory used for a DOMDocument object wasn't
built in... :|
thnx,
Christoph
--
PHP General Mailing
is it possible to overload the class construct(or) ?
if yes, how ?
No, it's not.
class A
{
function __construct()
{
echo A;
}
}
class B extends A
{
function __construct()
{
echo B;
not pretty but it is simple.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
way I can ensure that there is ever only one
instance of an object?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
); }
Adding the above to my sample class (from my OP) did nothing. Should it have?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
it.
Agreed. But apparently implementing them in PHP leaves things to be desired.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
irrelevant if the class can be instantiated directly.
That sort of kind of breaks the whole singleton thing...
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
. Not particularly
pretty, but definitely simple.
No, not pretty at all though it would address my issues. Thanks for the idea!
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Perhaps I'm misunderstanding what a static method variable is supposed
to do. I thought the value would be static for an class' instance but
it appears it is static across all instances of the class. Consider:
class StaticTest
{
public function __construct()
{
}
public function test(
Is there a way to call a SOAP function and pass the required XML as an
argument instead of an object? I can get this to work:
$oClient = new SoapClient( $sWSDL_URI, array( 'trace' = TRUE,
'exceptions'= TRUE );
$oArgObj = new ArgObj();
$oArgObj-node1 = 'value'
$oArgObj-node2 = 'value'
of a black box as possible and accessor methods allow
for that.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
? Seriously?
Textareas do have their problems but I wouldn't consider IE5.5 one of them... :p
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'm curious, what utilities do you guys use, if any at all, to map
out/diagram your classes? I'm looking for a decent (I don't really
need a ton of bells and whistles) freeware app but my searches thus
far have proven fruitless.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net
something wrong? Am I totally
misunderstanding something here?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
function call, it is passing
the data as part of a GET. Is it possible to tell the soap client
that it should use POST instead? I don't see anything in the
documentation the deals and/or discusses this.
Any help and/or advice would be greatly appreciated!
thnx,
Christoph
--
PHP General Mailing List
, it seems like it should be
the latter...
Advice and/or input would be much appreciated!
thnx,
Christoph
?php
class TestObj
{
private $sVar1;
private $sVar2;
private $sVar3;
private $aVar4;
public function __construct()
{
}
public function setVar1( $sValue
and/or comprehensive tutorial and/or
write-up on PHPs SOAP module? The documentation is pretty spartan and
what I have found doesn't really go in to much depth.
Any help would be greatly appreciated!
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
that make coding a lot more fun.
http://www.slickedit.com/
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hi
I have trouble while creating an DOMDocument. When I make $test = new
DomDocument('1.0');
php tells me a warning error like:
Entity: line 1: parser error : Start tag expected, 'lt;' not found ...
Because of unknow reasons the DomDocument constructor expected a tag
like 'test /'.
Ive
Always on the edge of greatness
Tripped on his way to the edge of greatness
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
if ($user_name = Dan Brown) {
echo GOING DOWN?!;
} else {
echo Welcome to Heaven;
}
So I guess that means we're all on the express elevator down. Looks
like it'll get awfully full... :p
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
()
{
echo '-two()';
return $this;
}
}
This works:
$bob = new bob();
$bob-one()-two();
whereas this doesn't.
$bob = new bob()-one()-two();
Why? I thought constructors returned the object?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net
and you're
like I am--you've been staring at a tree for so long, racking your
brain, that you forget about the forest altogether. :)
The constructor should already be returning $this.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
()
? Or, rather, why couldn't that have been taken into consideration?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I ran across a PHP function, strip_illegal_chars(), but can't seem to
find anything about it in the documentation. Does anyone know
precisely what it does? Or where I can find actual documentation for
that function?
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Could someone explain to me what I'm doing wrong?
I'm trying to get an element from one DOMDocument and append it to a
different DOMDocument. The (simplified) output of saveXML() from the
first DOMDocument is as follows:
?xml version=1.0 encoding=UTF-8? BranchRoot
DOM Nodes are specific to the document in which they were created, so
you can't just append a node from one document into another document.
The importNode function does what you want.
http://us2.php.net/manual/en/function.dom-domdocument-importnode.php
Interesting. Why is that, out of
You got me.
Wobbly PHP logo on mine (PHP-5.2.5 debian)
That's all I see for PHP-5.2.1. Should there be something more?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Wobbly PHP logo on mine (PHP-5.2.5 debian)
That's all I see for PHP-5.2.1. Should there be something more?
Probably not, but check the source. :-)
I checked the source. I didn't notice anything unusual...
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net
by the XPath query? Basically, I'm just
trying to get a fragment of the larger xml document...
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is that possible? Or is this something I'd have to do programatically
using the nodes returned by the XPath query? Basically, I'm just
trying to get a fragment of the larger xml document...
//[EMAIL PROTECTED]'gc3']/child/ancestor-or-self::*
Thanks for the response. However, I
What is wrong with the following code? It's throwing a DOMException
when I try to set the id attribute for the $lvl1Node but I can't see
why...
$doc = new DOMDocument('1.0', 'UTF-8');
$root = $doc-appendChild( $doc-createElement( 'root' ));
for( $a = 0; $a = 3; $a++ )
{
$lvl_1_id =
I want to know what is the best solution for handling errors. After reading
some
documents dealing with the subject, i have three options:
* Using a class for error handling
* Using PEAR error object
* Using try and catch exceptions
The error handling i want to implement will be done
should it not use curlies?
No, they will be deprecated as of PHP6. (Square brackets used to be, but
have been undeprecated and are back in favour!)
cheers for the heads up on curlies Mike :)
Where can I read more information about this?
thnx,
Chris
--
PHP General Mailing List
http://msdn2.microsoft.com/en-us/library/aa479002.aspx
I read an Article on the above Microsoft website stating the reason why to
Migrate from PHP to
ASP.NET. So can you please justify this proofs from Microsoft and let
everybody knows if they are
all TRUE and MEANIFUL atall or they are
Don't do that.
Some sites may or may not use www. for whatever reason...
Usually screwed-up A-name records by incompetent sysadmins, but there
it is...
Really? So
games.yahoo.com
blogreport.salon.com
mirror1.downloads.com
are examples of screwed up records by incompetent sysadmins?
thnx,
// Check if site is preceeded by 'WWW'
public function checkWWW() {
$myDomain = $_SERVER['SERVER_NAME'];
$FindWWW = '.';
$POS = strpos($myDomain, $FindWWW);
if ($POS === false) {
return false;
} else {
return true;
As an aside, you can save lines when debugging by doing:
echo 'pre' . print_r( $var, TRUE ) . '/pre';
OMG, thanks for that. Lines are so expensive nowadays and all.
Sarcasm aside, when I'm debugging I like to be as concise as possible.
thnx,
Chris
--
PHP General Mailing List
when I'm debugging I like to be as concise as possible.
Concise? Really?
Fair enough. Perhaps I should have said concise with my code, verbose
with my actual messages. :p
thnx,
Chris
Looking for
eval() is my favorite templating engine.
http://php.net/eval
Ditto on Eval()
PHP is already a templating system. Why go the long way around?
eval()? Man, you guys have some seriously large cajones. :p
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I agree. I usually add a little function like this to my PHP projects:
function debug( $var )
{
echo 'pre';
print_r( $var );
echo '/pre';
}
As an aside, you can save lines when debugging by doing:
echo 'pre' . print_r( $var, TRUE ) . '/pre';
thnx,
Chris
--
PHP General Mailing
Constructors return the object, correct? If so, how can I do this:
class Bob {
private $blah;
_construct( $blah ) {
$this-blah = $blah;
}
public getBlah() {
return $this-blah;
}
}
echo Bob( 'Hello!' )-getBlah();
When I try that, I get the message Undefined function Bob. I've
On Jan 29, 2008 2:37 PM, Paul Scott [EMAIL PROTECTED] wrote:
Looks like a repurpose of one of my posts:
http://fsiu.uwc.ac.za/index.php?module=blogaction=viewsinglepostid=gen9Srv59Nme5_7092_1182404204
actually, this is slightly different; here we are talking about being
able to immediately
I've read, I don't think something
like this is possible but I'm hoping that's not the case.
Any pointers?
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
like those that did originally have a
user defined key.
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
easiest to use XPath. Otherwise you have to slightly modify
your HTML...
Thanks for the link. It was very informative. I've switched to using XPath
and that seems to have solved my problems. Thanks for the help!
thnx,
Christoph
to point
me to something I might have missed.
thnx,
Christoph
properly. Am I doing something wrong?
Also, as an aside, one thing that I found odd is that count( $aLayoutNodes )
shows as 1 even though more are found. Huh?
thnx,
Christoph
,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
but I figured there
might be a better/easier way.
thnx,
Christoph
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php
for __FILE__ is global.php. Apart from
analyzing the debug_backtrace array, is there any way that myFunc() would
display one.php and two.php respectively?
thnx,
Christoph
it on the back.
Any ideas/pointers?
thnx,
Christoph
it on the back.
Any ideas/pointers?
thnx,
Christoph
().
thnx,
Christoph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
significant digit? If so, why?
Shouldn't rounding decisions be based on subsequent digits and not preceding
ones?
I am using PHP 4.3.11
thnx,
Christoph
My company has the following job openings available. Be sure to check out
our recruiting video at https://www.yakabod.com/join.html?nav=4. It's a
pretty fun watch. :)
Join in the Adventure.
Yakabod, a web software and services company, is located in a beautifully
restored facility in
Consider the following test code:
?php
$myArray = array();
for( $i = 0; $i = 1; $i++ )
{
$date = microtime( TRUE );
$key = rand( $date, $date * rand( 1, 5000 ));
$myArray[$key] = $key;
}
echo '$myArray items created: ' . count( $myArray ) . 'brbr';
$startTime =
}}})
Why isn't json_decode() converting the string to an array? Is there
something extra in there that json_decode() can't deal with? I can work
with it fine in javascript... :(
thnx,
Christoph
Please disregard. Sometimes I weep at my own stupidity... :p
thnx,
Christoph
On 10/19/07, Christoph Boget [EMAIL PROTECTED] wrote:
Please take a look at the following code and tell me what I'm doing wrong
here. I'm just not understanding why this isn't working:
:Value}],Key 2 2:[{Key
2 2 1:Value},{Key 2 2 2:Value}]}}
$myArr decoded:
Array
What's going on here? Why isn't json_decode() properly decoding my string?
Is there something more I need to do?
Any help would be greatly appreciated!
thnx,
Christoph
**
Maybe next time you'll have a challenge for me ;) And don't whine about
how I achieved what I did.
Brilliant! I never would have thought of that. ;)
thnx,
Christoph
Players
NFL_Team ( varchar32 )
Fantasy_team ( varchar32 )
I player can definitely be part of only 1 NFL Team. But how are you
handling your league? Is this just for a single small group of people? Or
is this database to be set up for lots of leagues? If the
at the top
(sorted) and all the lower case keys end up at the bottom (sorted).
Ideally, I'd like to see all the keys sorted (and intermixed)
regardless of case. Am I going to have to do this manually? Or is
there an internal php command that will do it for me?
thnx,
Christoph
--
PHP General Mailing
1 - 100 of 172 matches
Mail list logo