| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Comments:
<0> sgerbitz: ***uming that you hve the righ tkey-names in the $data array, and the table has data. <1> If a pair is 2, a dozen is 12, what would 3 be? <2> stravin: did you try echoing the header before sending it to make sure it looks ok? <0> Jymmm: triplet? <3> yea of course, prints out well <4> Jonnay - there is data in the tables <4> the names match up <0> sgerbitz: try a print_r of data then... <3> hum. w8... read to fast. I did echoed the string but not the header themselves. <1> Jonnay I think that would be closer to 'bi' than pair. <4> Jonnay - what do I put? <1> !+gv <5> Global Variables - this will show you everything that php sees: <pre><?php print_r($GLOBALS); ?><hr size=5 noshade><?php var_dump($GLOBALS); ?></pre> <6> does php support "unpacking" like in python? For instance, can I p*** a function (that takes 3 variables), an array with 3 elements instead of 3 individual variables? <7> coreyo: Alas, no. <7> coreyo: You can use call_func_array, but that's not quite the same.
<0> mattmcc: whats the difference? <7> Er, call_user_func_array <3> ||cw: as I told you, if I replace the array by a simple string everything works fine (hence the header is correctly sent) <6> mattmcc: hmm... I was getting all excited because an API that I'm using seems to do that, but maybe I'm looking at it wrong <0> sgerbitz: print_r($data) :P <7> coreyo: You can certainly write your function to say "If the first argument is an array, do this..", yes. <6> mattmc: no... not the same at all :) <2> Jymmm: a threesome? <4> Jonnay - its not spitting anything out <4> Jonnay - I feel stupid now <4> geez <4> didnt have the correct username/p*** combo <4> for db <2> coreyo: you can also use func_get_args <8> hey. <8> I'm getting this error when running make <8> libtool: link: `ext/date/lib/astro.lo' is not a valid libtool object <6> mattmcc: ||cw: my bad, this api is not using an array, but an object. It allows an object with the same local variables as the arguments. Does PHP support that? <7> PHP has no equivilant to python's argument unpacking natively. Only through methods like call_user_func_array or writing the function to check argument types. <2> coreyo: not sure what you mean <4> hmm still not workign <6> ||cw: I'm going to engineer a test to try it out, will let you know what I find :) <7> ||cw: In python, given 'def foo(a,b,c)' you can make a list args = ['foo', 'bar', 'baz'] and call it as 'foo(*args)' <7> Where the elements of args expand to the arguments of foo() <7> You can also use a hash to accomplish the same thing, but specifying argument names. <9> thats also why many functions exist in 2 versions <9> to accept several parameters or accept one array for parameter <9> like on (s|v)printf <7> Right, unpacking arguments saves you from having to do that extra work. <9> with vprintf its not possible different <9> i mean you need that as array cause you cant do that unpacking ;) <7> Sure you can. Arrays can contain arrays. <9> but php also offers it as parameter for the regular casesfor smaller and for not building the array <10> can contain arrays can contain arrays can contain arrays can contain arrays can contain arrays... <9> whatever we mean the same ;) <10> help, I'm trapped in an infinite loop! <7> To understand recursion, you must first do the other thing. <11> can someone help me with styl;e sheet switching? <10> roundyz: It's a #web question, but try http://www.alistapart.com/articles/alternate/ <7> Not exactly a PHP thing.. <10> I think that's right <4> hey guys, my brain just died... this should work right? :http://pastebin.com/554740 <7> Brain death is a serious condition. <7> sgerbitz: You should use mysql_fetch_***oc, and <?php echo $var ?> instead of <?= $var ?> <11> I have made a link to change the page and a if else statement to select which style sheet based on the results of 1 variable.... <12> hello <11> how do i get my link to change the variable? <10> roundyz: foo.php?var=bar <12> is there a way to install on-the-fly the gd extension if i didn't do it first time? <0> sgerbitz: Try adding the or die(..) to the select_db and the query. <10> roundyz: It's called a "GET request" <12> Fatal error: Call to undefined function: imagecreatetruecolor() <11> TML: can you explain it to me please? <10> roundyz: They happen to function the same from a link as they do from <form method="get"> <4> http://karlasjewelery.com/beta/test.php <10> roundyz: <a href="foo.php?somevar=somevalue">Link</a> <10> roundyz: What more explanation did you want? <4> Jonnay - added still nothing <11> TML: that shoul dbe enough
<10> roundyz: I *strongly* recommend you go read the first 3 segments of the PHP manual found at php.net/manual <10> roundyz: There's some REALLY important information in it <4> Jonnay - heres my code: http://pastebin.com/554744 my url: http://karlasjewelery.com/beta/test.php <13> Greetings... <13> ... using the mail() function... how do I specify the content-type to html? <0> I think it is in the manual. <13> I'm using mail($to,$subject,$message,"From: $from\n") <0> if not htemanual, in the user-notes to be sure. <4> FenixRF - maybe this: 'X-Mailer: PHP/' . phpversion(); <13> mail function by default sends as text/plain ... <13> but when I tried to add the header "Content-Type: text/html" mail dies <4> hmm. not sure <0> Fenix: do you need to add a CRLF to that? <10> FenixRF: Instead of trying to recreate a MIME mailer, why not use one of the 3 million pre-existing packages that does it for you? <13> oh, my bad... added a \n to the end <14> FenixRF: The content type isn't an email message header. It goes in the body and the MUA interprets it. For attachments and things like that, you should look at PEAR-Mail. <10> For example, http://pear.php.net/package/Mail_Mime <0> sgerbitz: well..<?php echo $product_id ?> won't work. but that isn't the problem. <10> This isn't a wheel that needs a lot of reinvention. <0> are you sure that the PRODUCTS table has data? (versus say Products or products) <0> afk, time for a offee <0> err coffee <1> select blah from PEOPLE <14> great. now I have to rename my "sheep" table. <15> TML ++ <16> RENAME TABLE HOLY_GOATS TO HOLY_GOAT; <16> done. <17> TML: it is? <10> You should name the table to reflect what's being stored in each tuple. Are you storing "a people" or "a person"? <18> hi all <19> oh.... i name mine 'posts' 'users' <19> etc <10> If you're dealing with Genealogical data, "PEOPLE" might be correct. <18> would it be a stupid idea always returning arrays by reference, to increase performance? <10> itrebal: It's generally considered poor style to do so. <18> would it be meaningless? <10> In-so-far as there is a generally accepted style for SQL, of course <20> TML: nope <10> Nope. <20> But it probably shouldn't exist anyway, so don't feel bad. <10> Mea culpa, mea culpa, mea maxima culpa. <20> It's as good as pairing any other three words. <21> how can i configure apache with php support in linux? <22> does anyone know about string manipulation in php <22> Basicly I want to remove every character from a string except a-z A-Z 1-9 . , <1> TML: From a human aspect SPONSORS or MEMBERS table makes more sense as it rolls of the tounge a lil more naturally. as you said 'a people' sound silly. <19> !tell kulbir about at <6> mattmcc: ||cw: I'm a moron. We are using multiple versions of a bug tracking system. We have a recent version, and our clients are using and older version. We have a link from the older version to submit to our newer version, and I was looking across versions. hence, one took a whole SLEW of variables, another took an object, and the note was a suggestion for future coding, not a comment for other programmers :) <23> Matthew^^: preg_replace <15> Jymmm: Is counting from '0' not silly as well? <6> mattmcc: ||cw: definitely no native unpacking of any sort :( <22> preg_replace <1> myconid: Nope, we aint Roman ya know! <22> can you give me an example <24> Someone tried to put me into a table. <25> Matthew^^: http://php.net/preg_replace <25> Matthew^^: see also: http://php.net/pcre <2> coreyo: as you were told, but you can achive it with func_get_args <0> Jymmm: unless we is Italian... <22> I know about preg_replace <22> But I dont think that will do it <25> Matthew^^: then you should have no problems doing it. <25> and yes, it will. <26> anyone know of an EASY way to post a file or stream to a website, one that uses a VERY small utility? <22> its for replacing text, wouldn't I have to specify every single character I want removed? <25> Matthew^^: right. and you can in fact replace text with nothing. <22> Yes <25> thus effectively stripping it. <25> now, if you read about how regex works, you'll see how preg_replace() is capable of doing that you need.
Return to
#php or Go to some related
logs:
ktorrent sarge deb livecd-install hangs gaim_dbus_pointer_to_id Verlihub webmin uable to lookup via gethostbyname() C++ PressEnter function
#ubuntu Settup Oracle ODBC datasource
pppoe mephis
#dns
|
|