[PHP] tow dimenshional arrays

2004-02-21 Thread joe-at
Hallo,
1) I want to work with the rows und columns of a tow dimensional
array[i][j]. With array[i] I get the i'th row. But how can I get the j'th
column?
2) Is there any command to transpose a two dimensional array?
Thanks for help

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: tow dimenshional arrays

2004-02-23 Thread joe-at
Like I supposed there is no efficient way how to do.
Thank you for the functios and the help of all of you.
Best regards,
joe-at

"Manuel VáZquez Acosta" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Namaste Adwinwijaya:
>
> I meant there's no PHP function neither to get a column nor to transpose
the
> matrix.
>
> The first answer you gave us, retrieves the amount of items in the column,
> not the column itself as an array. And the second one, just prints the
> matrix, but does not transpose it.
>
> Joe-At: I suggest you to tell us your exact problem, maybe there's a way
to
> solve it avoiding matrices, maybe there's a more suitable representation
to
> the problem's parameters.
>
> Manu.
>
> PS:
>
> This function retrives the j column, assuming that the matrix has no
> non-numerical indeces:
>
> function getColumn($arr, $j)
> {
> if (isset($arr[$j]) && count($arr[$j])>0)
> {
> $result = array();
> foreach($arr[$j] as $which)
> $result[] = $which;// You could make reference
> instead
> }
> }
>
> function getTranspose($arr)
> {
> if (count($arr)>0)
> {
> $result = array();
> for($i=0; $i for($j=0; $j {
> if (!isset($result[$j]))
> $result[$j] = array();
>
> $result[$j][$i] = $arr[$i][$j];
> }
> }
> }
>
> Keep in mind this are inefficient functions.
>
> Manu.
>
>
> "Adwinwijaya" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello Manuel,
> >
> > Sunday, February 22, 2004, 5:47:02 AM, you wrote:
> >
> > MVA> As far as I know, there is no such a function. Maybe you should use
a
> > MVA> different approach.
> > MVA> Manu.
> >
> > MVA> "Joe-At" <[EMAIL PROTECTED]> wrote in message
> > MVA> news:[EMAIL PROTECTED]
> > >> Hallo,
> > >> 1) I want to work with the rows und columns of a tow dimensional
> > >> array[i][j]. With array[i] I get the i'th row. But how can I get the
> j'th
> > >> column?
> > >> 2) Is there any command to transpose a two dimensional array?
> > >> Thanks for help
> >
> >
> > 1. $array_j = $array[$i] ;
> >count($array_j) ;
> >
> > 2.
> > foreach($array as $sub_array){
> >foreach($subarray as $key=>$value)
> >  echo $key.'=='.$value ;
> > }
> >
> >
> > cmiiw
> >
> > -- 
> > Best regards,
> >  adwinwijayamailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] frameset und php-script in frame

2004-02-24 Thread joe-at
hi pleas help me,

when I try to use php in a frame of a frameset it dos not work. what is
wrong with my files?



fameset.html:







frameset





  

  













test.php:







test





Jetzt sollt ein PHP-Skript erscheinen:









result of the top frame (test.php):

Jetzt soll ein PHP-Skript erscheinen:



test.php works without frameset:

Jetzt sollt ein PHP-Skript erscheinen:

Wer fersteht das noch?





Thanks for help

joe-at

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] frameset und php-script in frame

2004-02-25 Thread joe-at
Thanks for the hint, but the frames are wide enough.
I also tried it on my test server and on a real web server with the same
result.

"Sam Masiello" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]

I am afraid that I don't get the same problem that you do.  If I request
frameset.html in my browser I get the text that you are echoing in your
PHP statement in the top frame.

Is it possible that your resolution is such that you need to scroll in
the top frame to see it?  Try viewing the source of the top frame to see
if the contents of your echo statement is in there.

--Sam



joe-at wrote:
> hi pleas help me,
>
> when I try to use php in a frame of a frameset it dos not work. what
> is wrong with my files?
>
>
>
> fameset.html:
>
>
>
> 
>
> 
>
> frameset
>
> 
>
> 
>
>   
>
>   
>
> 
>
> 
>
> 
>
> 
>
> 
>
>
>
> test.php:
>
>
>
> 
>
> 
>
> test
>
> 
>
> 
>
> Jetzt sollt ein PHP-Skript erscheinen:
>
> 
>
> 
>
> 
>
>
>
> result of the top frame (test.php):
>
> Jetzt soll ein PHP-Skript erscheinen:
>
>
>
> test.php works without frameset:
>
> Jetzt sollt ein PHP-Skript erscheinen:
>
> Wer fersteht das noch?
>
>
>
>
>
> Thanks for help
>
> joe-at

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] pleas help me with frameset and php

2004-02-25 Thread joe-at
hi pleas help me,
when I try to use php in a frame of a frameset it dos not work. what is
wrong with my files?
I tried it on my test server and on a real web server with the same result.

fameset.html:



frameset


  
  






test.php:



test


Jetzt sollt ein PHP-Skript erscheinen:




result of the top frame (test.php):
Jetzt soll ein PHP-Skript erscheinen:

test.php works without frameset:
Jetzt sollt ein PHP-Skript erscheinen:
Wer fersteht das noch?


Thanks for help
joe-at

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] frameset und php-script in frame

2004-02-25 Thread joe-at
Sorry I wanted to say, that the original frame was long inough.

But I tried it again, and it does not work! 
joe

"Sam Masiello" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]

Yes, they are wide enough...i was speaking of long enough.  In other
words, be sure the top frame doesn't scroll.  The code as you posted it
works fine, but on my display it barely fits in the top frame.  On a
lower resolution you might not see the text in the top frame.

Have you tried making your top frame bigger (change the 83 to 200) to
see if you can see the text?

--Sam


joe-at wrote:
> Thanks for the hint, but the frames are wide enough.
> I also tried it on my test server and on a real web server with the
> same result.
>
> "Sam Masiello" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
>
news:[EMAIL PROTECTED]
.
>
> I am afraid that I don't get the same problem that you do.  If I
> request frameset.html in my browser I get the text that you are
> echoing in your PHP statement in the top frame.
>
> Is it possible that your resolution is such that you need to scroll
> in the top frame to see it?  Try viewing the source of the top frame
> to see if the contents of your echo statement is in there.
>
> --Sam
>
>
>
> joe-at wrote:
>> hi pleas help me,
>>
>> when I try to use php in a frame of a frameset it dos not work. what
>> is wrong with my files?
>>
>>
>>
>> fameset.html:
>>
>>
>>
>> 
>>
>> 
>>
>> frameset
>>
>> 
>>
>> 
>>
>>   
>>
>>   
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>>
>>
>> test.php:
>>
>>
>>
>> 
>>
>> 
>>
>> test
>>
>> 
>>
>> 
>>
>> Jetzt sollt ein PHP-Skript erscheinen:
>>
>> 
>>
>> 
>>
>> 
>>
>>
>>
>> result of the top frame (test.php):
>>
>> Jetzt soll ein PHP-Skript erscheinen:
>>
>>
>>
>> test.php works without frameset:
>>
>> Jetzt sollt ein PHP-Skript erscheinen:
>>
>> Wer fersteht das noch?
>>
>>
>>
>>
>>
>> Thanks for help
>>
>> joe-at

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: pleas help me with frameset and php

2004-02-25 Thread joe-at
Pleas change the line 5 in my frameset file.



The original line makes a too short top frame.

But this does not solve my problem.



"Joe-At" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> hi pleas help me,
> when I try to use php in a frame of a frameset it dos not work. what is
> wrong with my files?
> I tried it on my test server and on a real web server with the same
result.
>
> fameset.html:
>
> 
> 
> frameset
> 
> 
>   
>   
> 
> 
> 
> 
> 
>
> test.php:
>
> 
> 
> test
> 
> 
> Jetzt sollt ein PHP-Skript erscheinen:
> 
> 
> 
>
> result of the top frame (test.php):
> Jetzt soll ein PHP-Skript erscheinen:
>
> test.php works without frameset:
> Jetzt sollt ein PHP-Skript erscheinen:
> Wer fersteht das noch?
>
>
> Thanks for help
> joe-at

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: frameset und php-script in frame one part solved!

2004-02-25 Thread joe-at
Thanks for help,
only my testserver has a problem with my skripts.
It seems that I have not actually tested it on the server.
joe

"Joe-At" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Sorry I wanted to say, that the original frame was long inough.
> 
> But I tried it again, and it does not work! 
> joe
>
> "Sam Masiello" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]
>
> Yes, they are wide enough...i was speaking of long enough.  In other
> words, be sure the top frame doesn't scroll.  The code as you posted it
> works fine, but on my display it barely fits in the top frame.  On a
> lower resolution you might not see the text in the top frame.
>
> Have you tried making your top frame bigger (change the 83 to 200) to
> see if you can see the text?
>
> --Sam
>
>
> joe-at wrote:
> > Thanks for the hint, but the frames are wide enough.
> > I also tried it on my test server and on a real web server with the
> > same result.
> >
> > "Sam Masiello" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> >
> news:[EMAIL PROTECTED]
> .
> >
> > I am afraid that I don't get the same problem that you do.  If I
> > request frameset.html in my browser I get the text that you are
> > echoing in your PHP statement in the top frame.
> >
> > Is it possible that your resolution is such that you need to scroll
> > in the top frame to see it?  Try viewing the source of the top frame
> > to see if the contents of your echo statement is in there.
> >
> > --Sam
> >
> >
> >
> > joe-at wrote:
> >> hi pleas help me,
> >>
> >> when I try to use php in a frame of a frameset it dos not work. what
> >> is wrong with my files?
> >>
> >>
> >>
> >> fameset.html:
> >>
> >>
> >>
> >> 
> >>
> >> 
> >>
> >> frameset
> >>
> >> 
> >>
> >> 
> >>
> >>   
> >>
> >>   
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >>
> >>
> >> test.php:
> >>
> >>
> >>
> >> 
> >>
> >> 
> >>
> >> test
> >>
> >> 
> >>
> >> 
> >>
> >> Jetzt sollt ein PHP-Skript erscheinen:
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >>
> >>
> >> result of the top frame (test.php):
> >>
> >> Jetzt soll ein PHP-Skript erscheinen:
> >>
> >>
> >>
> >> test.php works without frameset:
> >>
> >> Jetzt sollt ein PHP-Skript erscheinen:
> >>
> >> Wer fersteht das noch?
> >>
> >>
> >>
> >>
> >>
> >> Thanks for help
> >>
> >> joe-at

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: pleas help me with frameset and php, party solved

2004-02-25 Thread joe-at
Thanks for help,
only my lokal testserver has a problem with my skripts.
It seems that I have not actually tested it on the webserver bevore posting.
joe

"Joe-At" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> hi pleas help me,
> when I try to use php in a frame of a frameset it dos not work. what is
> wrong with my files?
> I tried it on my test server and on a real web server with the same
result.
>
> fameset.html:
>
> 
> 
> frameset
> 
> 
>   
>   
> 
> 
> 
> 
> 
>
> test.php:
>
> 
> 
> test
> 
> 
> Jetzt sollt ein PHP-Skript erscheinen:
> 
> 
> 
>
> result of the top frame (test.php):
> Jetzt soll ein PHP-Skript erscheinen:
>
> test.php works without frameset:
> Jetzt sollt ein PHP-Skript erscheinen:
> Wer fersteht das noch?
>
>
> Thanks for help
> joe-at

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php