php-windows Digest 6 Jan 2002 14:27:12 -0000 Issue 939
Topics (messages 11317 through 11324):
Re: Array within a Class?
11317 by: Michael Sims
11318 by: Ed Swartz
11319 by: Chris Hall
Re: $PHP_SELF
11320 by: David
How to generate bitmaps containing truetype fonts?
11321 by: Florian Luethi
i have e problem with eregi replace
11322 by: Süleyman Demirkeser
Re: XSL encoding not recognized in PHP 4.1.0 XSLT support ?
11323 by: rashkatsa
Xml Based content management system..
11324 by: Emile Bosch
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
At 03:04 PM 1/5/2002 -0800, Chris Hall wrote:
>Just a quicky --
>
>I have yet to see anyone define an array within a class, yet if it is
>possible, would i be able to access that array with
>$this->array["variable"];?
I've designed a class that has a method that RETURNS an array, but it
sounds like you want to define one of the properties of your class as an
array, i.e.:
class testObject {
var $testarray = array("firstindex" => "firstvalue",
"secondindex" => "secondvalue");
...
}
I haven't personally done this, but I can't see why it wouldn't be
possible. Then if you wanted to access it inside a method you should be
able to the way you have described, like:
function testMethod () {
return $this->testarray["firstindex"];
}
Should work....why don't you give it a shot and see what happens? :)
--- End Message ---
--- Begin Message ---
Mike,
Yes, you can create and access an array within a class. I've written
seveal classes using arrays and it works just fine:
class Produce
{
var $Fruit = array();
function Produce()
{
// Access class variable
$this->Fruit[] = "Oranges";
$this->Fruit[] = "Grapes";
}
function More()
{
// Create and access local array
$Vegies = array();
$Vegies[] = "Broccoli";
$Vegies[] = "Onions";
}
}
Michael Sims wrote:
>
> At 03:04 PM 1/5/2002 -0800, Chris Hall wrote:
> >Just a quicky --
> >
> >I have yet to see anyone define an array within a class, yet if it is
> >possible, would i be able to access that array with
> >$this->array["variable"];?
>
> I've designed a class that has a method that RETURNS an array, but it
> sounds like you want to define one of the properties of your class as an
> array, i.e.:
>
> class testObject {
>
> var $testarray = array("firstindex" => "firstvalue",
> "secondindex" => "secondvalue");
>
> ...
>
> }
>
> I haven't personally done this, but I can't see why it wouldn't be
> possible. Then if you wanted to access it inside a method you should be
> able to the way you have described, like:
>
> function testMethod () {
>
> return $this->testarray["firstindex"];
> }
>
> Should work....why don't you give it a shot and see what happens? :)
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
Do you need a Web-based Content Publishing System ?
Call me for more details.
Ed Swartz
ColdFusion and PHP Development
978.772.0888
http://www.sandypondconsulting.com
--- End Message ---
--- Begin Message ---
dankeshane Micheal -- ill give it a shot and let ya know how it turns out :)
Chris Hall
hardwired industries
"Michael Sims" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 03:04 PM 1/5/2002 -0800, Chris Hall wrote:
> >Just a quicky --
> >
> >I have yet to see anyone define an array within a class, yet if it is
> >possible, would i be able to access that array with
> >$this->array["variable"];?
>
> I've designed a class that has a method that RETURNS an array, but it
> sounds like you want to define one of the properties of your class as an
> array, i.e.:
>
> class testObject {
>
> var $testarray = array("firstindex" => "firstvalue",
> "secondindex" => "secondvalue");
>
> ...
>
> }
>
> I haven't personally done this, but I can't see why it wouldn't be
> possible. Then if you wanted to access it inside a method you should be
> able to the way you have described, like:
>
> function testMethod () {
>
> return $this->testarray["firstindex"];
> }
>
> Should work....why don't you give it a shot and see what happens? :)
>
--- End Message ---
--- Begin Message ---
Steve Yates said something on 05 Jan 2002, in php.windows:
> "David" <[EMAIL PROTECTED]> wrote:
>> Gregory Hart said something on 05 Jan 2002, in php.windows:
>> > I understand that the variable $PHP_SELF doesn't always work.
>> > I'm using Windows 98 SE with PHP 4.1.1. Is there any way to get
>
> I think I have seen $PHP_SELF not work on PWS...is that what you
> have? You might try $PATH_INFO or $SCRIPT_URL.
>
>> $SCRIPT_NAME usually works for me on most servers.
>
> I think this returns the program or CGI name. At least is does on
> the versions of Apache that I've tried.
>
True, on Apache, PHP_SELF work, on others, (IIS, Xitami) it will not, but
SCRIPT_NAME does.
If you put a little bit of code at the beginning of your script like:
if(isset($PHP_SELF)) $THIS_SCRIPT = $PHP_SELF;
else $THIS_SCRIPT = $SCRIPT_NAME;
Then there is $PATH_INFO, which is even less consistant.
Regards,
David
--- End Message ---
--- Begin Message ---
I'd like to build a script that generates bitmaps for a navigation bar.
I only reached to draw post script fonts and to write a .png file. But I'd
like to use true type fonts instead and to write the bitmaps as .gif files.
Can anybody give me a hint? Is there a tool that converts .pngs to .gifs? Is
it possible to use truetypes?
Thanks!
--- End Message ---
--- Begin Message ---
i have a array
$row["a"]="birinci";
$row["b"]="ikinci";
$row["c"]="üçüncü";
And i have a string
$kelime='http:a:ptth deneme yapıyorum ikinci http:b:ptth heuheu http:c:ptth eheuheu
http:1:ptth';
i try to chance something in string like this command
$comment = eregi_replace( "http:([-a-z0-9\_\./~@?=%&(\\n)]+):ptth",$row["\\1"],
$kelime);
but it doesn't work
i wantted to change my string to
'birinci deneme yapıyorum ikinci ikinci heuheu üçüncü eheuheu birinci'
how can i do it
Thanx for interesting
--- End Message ---
--- Begin Message ---
ok. thanks !
i'll try this way !
regards,
rashkatsa
Rick Salsa wrote:
> It works great!! I downloaded the and installed. Worked the first time!!
>
> Rick Salsa
> Interactive Media Developer
> Fusion Communications Group Inc.
> 200-290 Vaughan Street
> Winnipeg, MB R3B 2N8
> p.204.925.4321 f.204.925.4320
> [EMAIL PROTECTED]
> www.fusiongroup.mb.ca
>
> "Olivier Mascia" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>>Hello,
>>
>>Olivier Mascia wrote:
>>
>>OM> RS> I've got php 4.1.1 running on a win98 box with Apache 1.3.22
>>
> installed.
>
>>OM>
>>OM> Where did you get the 4.1.1 binaries for Windows ? I thought only
>>
> 4.1.0
>
>>OM> where available for now from www.php.net. Did you compile it yourself
>>
> or
>
>>OM> are they already available from somewhere else ?
>>
>>Ok. My fault. Should have checked first. They were made available just
>>today on www.php.net. Going there to download.
>>
>>--
>>Olivier Mascia <[EMAIL PROTECTED]>
>>
>
>
--- End Message ---
--- Begin Message ---
Has anyone build an XML based Content management System, or does anyone know
a link of an opensouce xml based content management system?
Thanks for your help
Emile Bosch
--- End Message ---