Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-10-31 17:29:46

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Return the name of section in array

I’m looking to have all the name of the sections, only the names not the titles.

I’m traying this :

$sections = safe_rows('name', 'txp_section', 'name <> ""');
foreach($sections as $name) {
echo $name;
}

…and obvouisly, I’ve got only Array.

Can somebody help me, please?

Tks lot in advance.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2007-10-31 17:53:36

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Return the name of section in array

try safe_column instead of safe_rows.

Offline

#3 2007-10-31 18:08:02

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: Return the name of section in array

Ya ruud. As always your are the best!

I understand my error : rows for records and column for fields only.

Last edited by Pat64 (2007-10-31 18:08:44)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB